Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

C# App.config files

  • 16-07-2009 04:48PM
    #1
    Registered Users, Registered Users 2 Posts: 5,397 ✭✭✭


    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, Registered Users 2 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, Registered Users 2 Posts: 5,397 ✭✭✭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, Registered Users 2 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