Question

I built a small app with VS 2010 in WPF. I have used to store data in SQL lite. I have bound a dropdown field from SQL lite dataconnection. When I run this application in VS it was worked fine. And published it as a click-once app. I have added SQL Lite.db file to application files and it appears in Project Properties -> Publish tab -Application Files.

I set the file's Build Action to "Content", and in Application files, set it to "Include". But still the dropdown field doesn't have any values.

Was it helpful?

Solution

most likely the path to database gets lost. See Accessing Local and Remote Data in ClickOnce Applications - you need to make your sqlite file as Data (not Content as you did), and use ApplicationDeployment.CurrentDeployment.DataDirectory folder as a base folder for it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top