I am working with a vb.net Windows Forms application which has Application Settings, running under Windows XP.
The vs 2010 solution creates a MyApplication.exe.config but when I edit the file with notepad, the application ignores the changes even after reboot. Even if I delete the exe.config file the application still uses the settings from when it was compiled. So I decided to peek inside the exe file with a hex editor reveals the settings are encoded into the exe.
The user wide settings persist properly, but their default values are not coming from the exe.config but from elsewhere.
Is there something broken about my application or is this the way VB.Net Windows Forms Applications typically work?
Typically I develop console or service applications using C# where I can edit the exe.config without any problems.
The line in question:
If My.Settings.UseLocalOrGlobalSettingForOutputFolder.ToUpper.Equals("LOCAL") Then
The exe.config file looks pretty normal
<applicationSettings>
<DHModule.My.MySettings>
<setting name="UseLocalOrGlobalSettingForOutputFolder" serializeAs="String">
<value>Local</value>
</setting>
This is a visual studio 2010 solution with about 20 projects in it including a Setup Project. I have removed and rebuilt the project in question.
I have run out of time allowed for this project so…..
NOTE: I am going to work around this problem by not using any application-wide settings.
NOTE: I am going to work around this problem by not using any application-wide settings.
NOTE: I am going to work around this problem by not using any application-wide settings.
In app.config for the running executable look under
<configuration> <configSections> <sectionGroup>and make sure the section exists:<section name="DHModule.My.MySettings"…