WinForm .Config loading issues

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe

    #1

    WinForm .Config loading issues

    Hi
    Does anyone know of any issues about loading config files for windows
    forms applications?

    I have an application that utilizes a config file that holds my database
    connection string as well as other user settings. With the original VS.NET,
    when loading the application through the IDE debugger everything went as
    planned and the config file was loaded.

    Now with VS.NET 2003 it seems that when I run the debugger the config file
    is deleted..... go figure.... Is this some new funky hell annoying
    bug/feature or what?

    If I set a dynamic property for one of the forms to be stored in the
    appSettings section of the config file, when I kick off the debugger again
    this time a new config file is created with that setting as one of the keys.

    I tried re writting my keys into this generated config file but when loading
    from the debugger it always is overwritten.

    If I just run the application everything seems to work fine.

    Any ideas??

    Cheers
    Joe


  • Joe

    #2
    Re: WinForm .Config loading issues

    Ahhh Figured it out..... VS.NET 2003 now allows you to add a "Applicatio n
    Configuration Settings" item to your projects. default name is app.config
    which at compile time generates the <application name>.exe.confi g file.

    hope it helps someone else :)

    Joe.

    "Joe" <jcohen@circles olutions.com.au > wrote in message
    news:OpsIxtkVDH A.2316@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Hi
    > Does anyone know of any issues about loading config files for windows
    > forms applications?
    >
    > I have an application that utilizes a config file that holds my database
    > connection string as well as other user settings. With the original[/color]
    VS.NET,[color=blue]
    > when loading the application through the IDE debugger everything went as
    > planned and the config file was loaded.
    >
    > Now with VS.NET 2003 it seems that when I run the debugger the config file
    > is deleted..... go figure.... Is this some new funky hell annoying
    > bug/feature or what?
    >
    > If I set a dynamic property for one of the forms to be stored in the
    > appSettings section of the config file, when I kick off the debugger again
    > this time a new config file is created with that setting as one of the[/color]
    keys.[color=blue]
    >
    > I tried re writting my keys into this generated config file but when[/color]
    loading[color=blue]
    > from the debugger it always is overwritten.
    >
    > If I just run the application everything seems to work fine.
    >
    > Any ideas??
    >
    > Cheers
    > Joe
    >
    >[/color]


    Comment

    • Joe

      #3
      Re: WinForm .Config loading issues

      Ahhh Figured it out..... VS.NET 2003 now allows you to add a "Applicatio n
      Configuration Settings" item to your projects. default name is app.config
      which at compile time generates the <application name>.exe.confi g file.

      hope it helps someone else :)

      Joe.

      "Joe" <jcohen@circles olutions.com.au > wrote in message
      news:OpsIxtkVDH A.2316@TK2MSFTN GP09.phx.gbl...[color=blue]
      > Hi
      > Does anyone know of any issues about loading config files for windows
      > forms applications?
      >
      > I have an application that utilizes a config file that holds my database
      > connection string as well as other user settings. With the original[/color]
      VS.NET,[color=blue]
      > when loading the application through the IDE debugger everything went as
      > planned and the config file was loaded.
      >
      > Now with VS.NET 2003 it seems that when I run the debugger the config file
      > is deleted..... go figure.... Is this some new funky hell annoying
      > bug/feature or what?
      >
      > If I set a dynamic property for one of the forms to be stored in the
      > appSettings section of the config file, when I kick off the debugger again
      > this time a new config file is created with that setting as one of the[/color]
      keys.[color=blue]
      >
      > I tried re writting my keys into this generated config file but when[/color]
      loading[color=blue]
      > from the debugger it always is overwritten.
      >
      > If I just run the application everything seems to work fine.
      >
      > Any ideas??
      >
      > Cheers
      > Joe
      >
      >[/color]


      Comment

      Working...