473,406 Members | 2,843 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,406 software developers and data experts.

is My.Settings version specific?

Since the .config file that contains the values in My.Settings is saved
to...

%USERPROFILE%\Local Settings\Application
Data\<companyname>\<appdomainname>_<eid>_<hash>\<v erison>

....that implies that if I update the AssemblyVersionAttribute (make a
new build, say), my users' configuration files will no longer be valid.
Does that sound right? Seems like an odd default behavior. I suppose I
could manually copy the .config file during the upgrade installation,
but... well, it just seems silly.

Also, in a related question, the <companynamein the above path seems
to have spaces replaced with underscores. Is that a documented
behavior, too? I can't find it in the SDK.

Thanks,

g.

Aug 11 '06 #1
2 1272
"Graham Charles" <gr****@aiid.comschrieb:
Since the .config file that contains the values in My.Settings is saved
to...

%USERPROFILE%\Local Settings\Application
Data\<companyname>\<appdomainname>_<eid>_<hash>\<v erison>

...that implies that if I update the AssemblyVersionAttribute (make a
new build, say), my users' configuration files will no longer be valid.
Does that sound right? Seems like an odd default behavior. I suppose I
could manually copy the .config file during the upgrade installation,
but... well, it just seems silly.

You may want to check out the 'My.Settings.Upgrade' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Aug 11 '06 #2
Thanks for that. Is there a way to test if the application is being run
for the first time since an upgrade? IsFirstRun (in
....ApplicationDeployment) seems to pertain to ClickOnce apps only. For
now, I've created a new user-scoped setting "HasRun" with a default
value of False, and am setting it to true in my Main code:

If Not My.Settings.HasRun Then
My.Settings.Upgrade() ' / retrieve current settings
My.Settings.HasRun = True
End If

Does that look like a best practice?

Thanks again,

g.
Herfried K. Wagner [MVP] wrote:
"Graham Charles" <gr****@aiid.comschrieb:
Since the .config file that contains the values in My.Settings is saved
to...

%USERPROFILE%\Local Settings\Application
Data\<companyname>\<appdomainname>_<eid>_<hash>\<v erison>

...that implies that if I update the AssemblyVersionAttribute (make a
new build, say), my users' configuration files will no longer be valid.
Does that sound right? Seems like an odd default behavior. I suppose I
could manually copy the .config file during the upgrade installation,
but... well, it just seems silly.


You may want to check out the 'My.Settings.Upgrade' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Aug 11 '06 #3

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

Similar topics

1
by: Lady_A | last post by:
I got an application with an html,css and js UI. The UI basically creates an ActiveX object, which is an unmanaged C++ COM dll which in his turn creates other COM C++ dlls and C# assemblies. At...
7
by: Michel | last post by:
Hi, I am not able to see the Asp.Net Tab in IIS 5.1. I have installed Visual Studio 2005 on a Windows Xp SP2. When I following the step from the following url, I can not see this tab. I am logged...
2
by: Nevyn Twyll | last post by:
I understand that I am not supposed to alter the .config file for a program (accessible through the AppSettings). Is there a System class you could recommend that I could use (or even a class...
7
by: MrNobody | last post by:
I was a Java developer so I'm used to using property files as a means to keep configuration settings for my apps. I'm wondering what options are there with ..NET? Some settings I want to include...
3
by: Damian | last post by:
Hi everyone I'm having an issue with one of our applications. I'm getting the following error when attempting to log in to the site: Server Error in 'xxxxxxxxxxxxxxxx' Application....
7
by: Kirk | last post by:
Hello, I am trying to find a VB.NET method that will allow me to save and read an application's settings in a separate file located on any drive, any folder. I have found a couple of methods...
3
by: David Cartwright | last post by:
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....
0
by: Marc | last post by:
Hello, I have a problem with the settings (save and load) My.Settings in VB.NET2005. Actually, I have made a new application, then I have created a setting (with a default value) and then I...
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...
3
by: Bob Altman | last post by:
Hi all, In my VB 2005 project I create a setting called UpgradeRequired with a default value of True, and I include the following code that runs when the project is launched: If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.