Winforms app, user setings don't get persisted.

B

Bob

Winforms application in VS2005 using VB.
Have some code that sets a user setting using the my.settings code
For instance My.Settings.ThisSetting = "New setting" then My.settings.Save()
to explicitly save it.
After doing this I close the application, look at the application's config
file and see that the ThisSetting is not New Setting but is still the old
setting. When I open the application again, I can see that the old setting
is still being used.

This occurs when running the distributed executable. In the development
environment when I run it in debug mode I can also see that the config file
of the vshost does not persist the change.

How can I persist the changes I need to make to the app.config file? I want
to try to avoid having to use Notepad to edit the config files.
I had a class doing this in my 2003 application but the xml text that
appears to need to be changed looks quite different between what was used in
2003 config files and in 2005 config files.

I would realy appreciate any help with this problem.

Bob
 
B

Bob

Looks like problem was 18 inches from screen, got it working.
Found that to persist, had to close application after doing save, not sure
why this seems to be so. In any case I'm gonna call this one good enough.

Bob
 

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