app.config for exe file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I copied my app.config into the bin folder and tried to deploy both the .exe
and app.config file so my user will be able to change values such as
connectionstr settings. But I can't get the app.config to work unless I
change the one inside the solution. How can I make the app.config work
ouside of the solution environment? Thanks.
 
Hi,

Normally when you (re)build your solution, the app.config is is put
automaticly in your bin-directory as "MyApplication.exe.config". But when
running the solution from your visual studio, it will indeed take the
original app.config file each time. Only when you run directly the
MyApplication.exe in the bin-folder, it will use the values in the
MyApplication.exe.config. This happens also on deployment.

In case you meant that the application itself changes the app.config: indeed
that doesn't work: you can't write in the app.config via your application.
users can only edit it using notepad or applications like that.

hope this helps,

Pieter
 
Back
Top