C#部署通过安装保留文件 [英] C# Deployement retaining files over an installation
问题描述
我已经使用Visual Studio创建了安装和部署项目,并安装了安装程序. 在我安装安装程序后,它会复制一些文件(XML),这些文件在使用该应用程序时将以编程方式进行配置. 现在,如果用户再次重新安装此设置,我需要询问用户是否需要覆盖或保留这些配置的文件?
关于如何实现此目标的任何想法吗?
感谢&问候, 弗兰
查看用于Windows Installer的文件版本控制规则.
简而言之,假设您引用的这些XML文件是未版本控制的文本文件,则MSI将比较创建日期和修改日期,并且不会替换您所说的以编程方式更新的更新XML文件(安装后). /p>
我建议您需要考虑其他几个变量,以确保事情按预期进行: REINSTALLMODE 属性.
I have created a Setup and deployment project using the Visual studio and install the setup. After i install the setup it copies a few files(XML) which on using of the application are configured programmatically . Now , If the user is reinstalling this setup again i need to ask the user whether these configured files need to be overwritten or be retained ??
Any idea as to how this can be accomplished ?
Thanks & Regards, Fran
Look into file versioning rules for Windows Installer.
In short, assuming that these XML files you refer to are unversioned text files, MSI will compare the Created and Modified dates and will not replace the updated XML files which you say are updated programmatically (post-install-time).
I would suggest several other variables you need to consider to make sure things are working as you expect: major vs. minor upgrade, and the REINSTALLMODE property.
这篇关于C#部署通过安装保留文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!