Windows Develop Bookmark and Share   
 index > Windows Forms General > User Settings not Sensible to Versioning II
 

User Settings not Sensible to Versioning II

Hi,
I'm posting for the second time on a different forum as the previous one was apparently wrong.

i have developed an application exploiting the user settings fileto save some data related to the user activities. I access the data through "Settings.User.Default" object.
The probelm came when i have compiled a new version of the software and ran it on my machine... all the saved user settings goes away.

I have checked inside the "C:\Documents and Settings\$User$\Local Settings\Application Data\$manifacturer$\$application$" and in fact there is a new folder named with the new version and a brand new setting file inside, obvously empty.

Is it possible to say somehowthat the new version of the software will have to use the old setting file as soon as it ran into a machine where the application was previously installed?

In the other forum i've been suggested to built a custom action in the installer to merg/copy the settings file but i would prefer not to follow this way and to solve it, if possible, on a app level.

Thanks a lot for any help,

Filo
fcampanini  Tuesday, December 16, 2008 9:21 AM
Check out the ApplicationSettingsBase.Upgrade and GetPreviousVersion methods.
Hans Passant.
  • Marked As Answer byfcampanini Friday, December 19, 2008 10:21 AM
  •  
nobugz  Thursday, December 18, 2008 1:44 PM
Check out the ApplicationSettingsBase.Upgrade and GetPreviousVersion methods.
Hans Passant.
  • Marked As Answer byfcampanini Friday, December 19, 2008 10:21 AM
  •  
nobugz  Thursday, December 18, 2008 1:44 PM
That's exactly what i was looking for!

Thanks a lot.

Filo
fcampanini  Friday, December 19, 2008 10:21 AM

You can use google to search for other answers

Custom Search

More Threads

• ArrayList Problem
• Creating unusual user interface (looking for more reading materials)
• Maximize Form
• How to write a textbox can type text, copy and paste image like creating new in Outlook on my form?
• Want to display word document(with only work pane of ms-word) in windows app.
• Invalid Cross-Thread Operation (Invoke not avaiable)
• No XOR Drawing in Bitmaps using standard GDI
• datagrid repaint problem
• How to exit an app thats currently executing a loop
• How to run a dos command in the Window Forms