473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Preserving My.Settings between product versions

Hi all,

Apologies if this is a FAQ - I've searched all the groups I can think of,
though.

I've written a VB.NET application and an associated Installer project in
Visual Studio 2005. My.Settings works just great, but the problem is that
when I produce a new version of the application, the My.Settings
user-related settings are lost - presumably because they're saved in the
version-specific application data directory and so when a new version number
arrives, the settings file reverts to the default (blank) values.

Is there a straightforward way of making the system "remember" the settings
when the version number increases?

Many thanks in anticipation,

David C
Oct 16 '06 #1
3 4928
Hi David,

To reflect a most recent installation of the application, we can use
My.Settings.Upgrade method. It will search for the user.config file in the
most recent version of user profile, and copy it the current version
folder. Also, you have to make sure this method is only called once in
your app's first run.

For more information, please check the following link:

http://msdn2.microsoft.com/en-us/lib...applicationset
tingsbase.upgrade.aspx

If anything is unclear, please feel free to let me know.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 17 '06 #2
Hi David,

I'd like to know if this issue has been resolved yet. Is there anything
that I can help. I'm still monitoring on it. If you have any questions,
please feel free to post them in the community.

Kevin Yu
Microsoft Online Community Support
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 19 '06 #3
"Kevin Yu [MSFT]" <v-****@online.microsoft.comwrote in message
news:a3*************@TK2MSFTNGXA01.phx.gbl...
I'd like to know if this issue has been resolved yet. Is there anything
that I can help. I'm still monitoring on it. If you have any questions,
please feel free to post them in the community.
Hi Kevin,

Sorry, been away. Yes, that worked a treat thanks. I've just added a boolean
to My.Settings, with default value False, and then in the .Load handler for
the application, chucked in:

IF NOT My.Settings.lUpgraded
My.Settings.Upgrade()
My.Settings.lUpgraded = 1
END IF

Works like a charm - many thanks.

David C
Oct 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dan | last post by:
I have an app that communicates over the Internet through API calls to the wininet DLL. I can determine whether IE has a proxy server configured (not the setting, just whether it uses a proxy...
0
by: User | last post by:
I am trying to use JDOM's SAXBuilder to parse an XML document that contains encoded latin-1 characters. After I parse the document, the special character Strings seem to be replaced with their...
0
by: dtsearch | last post by:
Announcing dtSearch® Product Line Release With New Terabyte Indexer New Version Can Index Over a Terabyte of Text in a Single Index, With Indexed Search Time Typically Under a Second BETHESDA,...
16
by: TTroy | last post by:
Hello, I'm relatively new to C and have gone through more than 4 books on it. None mentioned anything about integral promotion, arithmetic conversion, value preserving and unsigned preserving. ...
10
by: Paul Cheetham | last post by:
Hi, I am developing an application that needs to store some machine-specific settings. The application is going to be published on the network in order to keep the clients on the latest version....
0
by: Paul Evans | last post by:
I have an application which stores settings in a user file. This is because the application though being designed to be run by a single user will have the settings being updated on the fly, and...
3
by: sophia.agnes | last post by:
Dear all, I was going through the book "C a software engineering approach by darnell & Margolis" there was a section named sign preserving vs value preserving it is as follows sign...
5
by: Steve Barnett | last post by:
I added some user settings to my app which caused the Settings.settings to be generated etc... and all was well and lovely and the Sun was shining. Then I changed the version number of my...
0
by: David Troxell - Encourager Software | last post by:
Product Scope 7 (http://www.encouragersoftware.com/) and Profile Exchanges enhanced with SetupCast publishing methods NOTE: If you are a software author, releasing commercial and/or shareware...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.