Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Fail to upgrade the config file in VS2008
 

Fail to upgrade the config file in VS2008

1. Install my application version 1
2. edit my config file in the installed application folder.
3. Install my application version 2 as a upgrade
4. Config file cannot be replaced as version 2 config.

I would like to know how to replace the edited version 1 config file with the version 2 config file.

Thank you.

dickwong  Wednesday, July 15, 2009 5:47 PM
PhilWilson  Friday, July 17, 2009 8:08 PM
Hi dickwong,

Do you mean the "RemovePreviousVersions" property of your setup project has been set to True? When you install a new version, the config file does not be updated. I think you have set the "Permanent" property of the config file to True so it won't be replaced once there is a copy in the directory. To update to the new version, you should delete the old one. That will allow you to install totally new one.

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Friday, July 17, 2009 3:11 AM
Thank you for your reply.

RemovePreviousVersions = true
Permanent = False

The above are my settings.

I think RemovePreviousVersions is not longer works for VS2008.


Regards,
Dick
dickwong  Friday, July 17, 2009 6:37 AM
Hi dickwong,

RemovePreviousVersions is still useful in VS 2008, otherwise you will need to uninstall the app and install a new version. Since you have set the config file Permanent to false, does it be deleted when uninstalled?

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Friday, July 17, 2009 6:48 AM

Hi Kira,

We are currently suggest our customer to uninstall the previous version and install a new one.

I have tested to set the Parmanent to false, however, those config files was deleted after uninstallation.


Thanks,
Dick

dickwong  Friday, July 17, 2009 6:57 AM
But after install a new one, it still be the previous version of config file?
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Friday, July 17, 2009 7:46 AM
Yes......it won't be able to replace.
dickwong  Friday, July 17, 2009 9:32 AM
Hi dickwong,

That seems the new version of config file doesn't package into the MSI correctly, the file is still the old one so the old one be installed once again. Please check your config file in your project first and add them to the setup project.

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Friday, July 17, 2009 10:03 AM
PhilWilson  Friday, July 17, 2009 8:08 PM

You can use google to search for other answers

Custom Search

More Threads

• How to get the list of modules that need to be updated
• ensuring only one instance of an app is running with ClickOnce apps
• Serial number in VS 2005 Setup Project
• How to Deploy an VB 2005 application?
• deploying windows service
• System.invalidoperation on user computer install
• Particular question about a Setup and Deployment project.
• emergency,, please help
• storage limit w/ cd installation.
• .NET Windows Application Custom Prerequisite problem