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

前端 未结 3 1592
生来不讨喜
生来不讨喜 2021-01-15 19:49

I\'m using ClickOnce to deploy my application. When the app runs the first time, if a db doesn\'t exist, it creates one.

Problem is, when I update, it removes the lo

3条回答
  •  青春惊慌失措
    2021-01-15 20:25

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

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

提交回复
热议问题