Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
497 views
in Technique[技术] by (71.8m points)

installation - .net Setup project force new file replacement on reinstall

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...