Synchronize settings button isn't working

S

Seigfried

The MSDN documentation for Synchronize (Framework 3.5 -
http://msdn2.microsoft.com/en-us/library/a65txexh.aspx) states:

------------------------
The values of any user-scoped settings that the user changes at run time
(for example, the position of a form) are stored in a user.config file.
Notice that the default values are still saved in app.config.

If you have changed any user-scoped settings during run time, for example in
testing the application, and want to reset these settings to their default
values, click the Synchronize button.
------------------------

* Create a new windows application 'WindowsApplication1'
* Open My Project and go to the settings tab
* Change the default Setting name to MyString
* Change its type to String
* Add the traditional Hello World string in the Value column
(The Scope remains set to User)
* Open Form1 in design view and drag a label 'Label1' onto it from the
toolbox
* Double-click on the design surface to automatically insert Form1_Load
handler in the code view
* Inside Form1_Load handler add these lines:

My.Settings.myString = "GoodBye Cruel World"
Label1.Text = My.Settings.myString

* Run this and it works, displaying "GoodBye Cruel World" in Label1.Text.

* Exit from the application and Click the Synchronize button

Result:

The error ...

No user.config files were found in any of the following locations: [OK]

.... is displayed.

The Value column continues to hold Hello World.

To confirm that a local User.config file HAS been created and will be used,
follow these steps:

* Comment out the first line of code above: My.Settings.myString = "GoodBye
Cruel World"
* Run the application again.

Result:

"GoodBye Cruel World" continues to be displayed in Label1.Text

There is some sort of configuration error on my machine or else a bug in the
IDE. This behavior has been observed on my computer in Visual Studio 2005
Standard and VB.NET 2008 Express Edition. In fact, if the User.Config is
created in one, it will be used in the other. (Running Vista Business OS)

Reference Also:

"Synchronize settings button isn't working" PostID=511678
user "David Paterson" had the same problem
user "madangelo" had the same problem

The question was never answered in that post.

Numerous non-Microsoft forum references of the same problem can be found.
 

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