app.config for exe file

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.
 
D

DraguVaso

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top