1

I am experiencing a frustrating issue.

When I run my application (with Visual Studio 2012) in debug mode (clicking the start button), some variables from the object Settings.Properties.Default have incorrect values and I can't find how to change them.

I have revised them using the visual control "Settings.settings" and they are correct (I have also revised the Settings.designer.cs code file and is correct). I have also revised all the .config files I have found in the solution ({exe}.config, {exe}.vshost.exe.config, app.config) and the values of the variables are correct in all of them.

So, why in debug mode some variables from the Properties object have different values? And how can I change them?

This issue only occurs in debug mode. If I run the application from the Windows Explorer, the values are correctly read from the .config files.

Victor
  • 893
  • 1
  • 10
  • 25
  • can you try doing a `Clean` on the project and then recompiling perhaps it's looking at an old `.pdb` file.. this is the only thing I can think of at the moment.. – MethodMan Mar 25 '15 at 15:56
  • The problem persists even cleaning and rebuilding the project – Victor Mar 25 '15 at 15:58
  • 1
    try looking at some similar post and found solutions here on stackoverflow here is a link that sounds similar to your issue http://stackoverflow.com/questions/1054422/why-are-my-application-settings-not-getting-persisted – MethodMan Mar 25 '15 at 16:02
  • Well, the thing about that is, there are 2 files actually hosts the values, a .cs or .vs file, and the settings, or app.config file. The best way to change that would be to go to Project > [Project Name] Properties > Settings and make the changes there. – Hozikimaru Mar 25 '15 at 16:09

0 Answers0