.net Setup project force new file replacement on reinstall

拜拜、爱过 提交于 2019-11-28 11:29:07

问题


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.

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?

Best Regards,

Carlos Ouro


回答1:


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.

  • 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 ^^



来源:https://stackoverflow.com/questions/1682090/net-setup-project-force-new-file-replacement-on-reinstall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!