Visual Studio 2008 Caching App.config

Over the past couple of months I have problems with mine app.config. I will add the key AppSettingand run my project without a real problem, it reads the configuration file, and everything is fine. Then, at a later date, I will change the value of the same key, and when I start my project, I will get the old key value. It appears that it does not save the file properly or detects that a file failure has occurred app.config. if I clean or rebuild the solution, everything is in order. Has anyone else seen this problem, is there a hot problem? This is a real problem when you have to double-check the time, especially when keys are usually the difference between production and test environments. Imagine my surprise when I started typing test messages in my production environment, scary.

Thank you in advance

+3
source share
3 answers

the latest sp vs 2008 seems to have magically resolved my issue, although I don't see its notes

0
source

When compiling, your app.config file is copied to the bin / Debug or bin / Release folder. If you change your app.config in the source folder but do not recompile, the change will not be propagated. You need to rebuild to move it to the folder where the code actually runs.

Alternatively, modify the bin / Debug / app.config file.

, , , , , , . , , , . rebuild ,

/, (F6, Build → RebuildSolution), app.config. , , .

... , " " app.config, " "? : app.config , "".

0

Alternativley are you sure you are editing the correct app.config: o

Do you run it in administrator mode?

0
source

Source: https://habr.com/ru/post/1710512/


All Articles