开发者

Setup and Deployment -Installation with two different versions in .Net

I am using Setup and Deployment project to make an installer using .Net 2008开发者_JAVA百科/VS.

I install a product with a version .I add a xml file in File System of the installer.During installation,I change the xml according to the requirements and save it on a default path.Therefore the original xml file(obtained from file System) in installers is updated .

So when I increment the version ,accept the new UpgradeCode and rebuild the application. I do the above steps and re install it. In the default installation path,The xml file,which needs to be changed during installation, should be from the file system. I get the updated xml file of previous version.Rather, the original config file from file system needs to override the updated xml on a default path.This is not happening as of now.I am making changes to the previous version xml file.

Please let me know in which particular direction I need to take step.

Regards,

Sachin K


This is the normal behavior. An upgrade uninstalls the old version before installing the new one.

A solution is to use backup and restore custom actions:

  • a custom action will backup the installed XML before installation starts
  • another custom action will restore the XML when installation ends

This is not supported by Visual Studio, but it can be done in other setup authoring tools.

Another solution is to move RemoveExistingProducts action after InstallFinalize. This is also not supported by Visual Studio and it's even more complicated because of its requirements.

Basically, you can't do this in Visual Studio.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜