.NET安装项目武力的新文件替换上重新安装 [英] .net Setup project force new file replacement on reinstall

查看:224
本文介绍了.NET安装项目武力的新文件替换上重新安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个安装了几个项目和几个外部文​​件(其中一个是一个SQLite数据库)安装项目 - 一切正常,直到我最近修改的基本数据库文件包含在安装项目。

I have a setup project that install a couple of projects and a couple of external files (one of which is a SQLite Database) - everything worked fine until i've recently modified the base database file included in the setup project.

现在,每次我尝试重新安装项目中的新的数据库文件不会取代pviously安装了一个...我可以迫使它在某种程度上在VS或进行设置意识到这是一个新的版本,以便该文件得到$ P $更换?

Now, everytime i try to reinstall the project the new database file does not replace the previously installed one... Can i force it somehow in VS or make the setup realize this is a new version so the file gets replaced?

最好的问候,

卡洛斯欧鲁普雷

推荐答案

一个月,并在几天后... 所以,事实证明,有没有办法做到这一点到一个文件直接在VS2008的部署项目增加(使用有可能在VS2005 ...)。

One month and a few days later... So it turns out that there is no way to do this to a file added directly in the Deployment project in VS2008 (used to be possible in VS2005...).

但是,很多很多的尝试后,我终于想通了一个体面的解决办法。

But after many many attempts i finally figured out a decent workaround.

  • 我已经包含在文件直接在Windows窗体项目Database.sqlite(数据库)具有以下属性:生成操作 - >内容文件和复制到输出目录 - >复制总是

  • I've included the file "Database.sqlite" directly in a windows forms project (Database) with the following properties: "Build Action -> Content file" and "Copy to Output Directory -> Copy always"

然后我把它添加到通过项目输出 - >数据库 - >文件内容

Then i added it to the deployment project via Project Output->Database->Content Files

现在看来一切正常,文件被替换每一次我改变它,重新部署项目。

Now apparently everything works fine and the file gets replaced every time i change it and rebuild the deployment project.

这一次提出了相当多的战斗^^

This one put up quite a fight ^^

这篇关于.NET安装项目武力的新文件替换上重新安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆