ClickOnce deletes my local database when it updates.. how not to?

好久不见. 提交于 2019-12-01 12:23:14

I imagine you're putting it in the applications directory... don't!

Put it in Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData or Environment.SpecialFolder.LocalApplicationData).

Don't include the database in the deployment. Implement your own db creation (using script) when the database isn't present.

In the project's Publish options, under Application Files, is the database file's Publish status set to Data File?

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