Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C# App.config files

Options
  • 16-07-2009 4:48pm
    #1
    Registered Users Posts: 5,379 ✭✭✭


    Hi all,

    Anyone got any experience with App.config files in C# (Visual Studio 2008).

    I'm having an issue when i move from my development machine to my test machine.

    Can anyone confirm that the App.config file is "statically" linked into the exe, as this seems to be whats happening...

    I want to load the app.config time every time my application starts.


Comments

  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    The App.Config is usually built out alongside your XYZ.exe, renamed to XYZ.exe.config. It should be in the appropriate bin folder along with the binary, and needs to be deployed along with it, assuming you use it.


  • Registered Users Posts: 5,379 ✭✭✭DublinDilbert


    The App.Config is usually built out alongside your XYZ.exe, renamed to XYZ.exe.config. It should be in the appropriate bin folder along with the binary, and needs to be deployed along with it, assuming you use it.

    Hi,

    Thanks for the reply.... I just figured it out a few mins ago, it was exactly as you said, App.config gets renamed when the application compiled... and if you change the renamed file the configuration values read in the program will reflect this....


  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    Yeah, that's the idea - it's mean to be a runtime config file, so your users can change various settings you make available, without having to rebuild your project from the source code. You can store your config any way you want of course, but the App.Config mechanism is pretty handy out of the box.


Advertisement