Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

After changing My Settings Name on application settings setup panel, the user.config file disappears or has only 3-5 lines and the application settings operation stop working in its totality

$
0
0

My original (wrong) settings name was "User'sOption" when I replaced the default name "Settings1".settings. And  I quickly decided that I was wrong because no apostrophe has everbeen allowed in naming in the MS world so far as I could remember.

So I rename it to "UserOption".settings in the VS2012 Express C# editor. I got, of course, the warning message of "not reusable" but decided to do it anyway. The name of the designer.cs file did not change accordingly. Instead, it changed to UserOption1 without my intervention. So I thought I could live with it although it was wrong by adding an extra "1" to it. Then the big surprise occurred to me, i.e., the saving-in-user.config refused to work and value-changes in properties( all five int-type indices under the user-scope with default values of five 0's) were ignored by the operation altogether. (It never worked because this was my first use of the application settings class of MS WPF System.Windows.)

I then checked the user.config and found four of folders under "Hewlett Packard Company" with folder-names like XXX.exe.vhost.config.hashcode... or simply XXX.exe.plus hashcode..(wherein XXX stand for my namespace or application name.) I was surprised to have found so many folders. The user.config had only 3-5 lines in XML file and no any property value nor term concerning serialization was ever mentioned.  Moreover, after I deleted the settings in preparation to a clean run, I found to my dismay that the user.config file disappeared without a trace.

I've such a bad luck until today that no rejoice has ever come to me for the application settings operation being successful at least once from the very beginning. The only satisfaction I got was that there was not a single letter coming up to show me in terms of exceptions. That means the problem is not due to my lack of skill and ability in coding :)

I have sought for the past couple of days for help and come up with none. I hope my Microsoft colleagues would have some ideas as to how to remedy the issue (possibly due to my mistake in naming the wrong settings-name in the first place.)

Thank you in advance.

Mark

PS - I did click the synchronize button once although without knowing it would "remove the user's configuration file where the application saves changes to user settings." Also, if I'm not mistaken, the application settings are based on the windows form architecture and are quite old.



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>