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
Don't include the database in the deployment. Implement your own db creation (using script) when the database isn't present.
I imagine you're putting it in the applications directory... don't!
Put it in Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData
or Environment.SpecialFolder.LocalApplicationData)
.
In the project's Publish options, under Application Files, is the database file's Publish status set to Data File?