Reputation: 380
I have been working on a project in vb.net which uses an SQLite database (Patient_Database.db). The connection between the software and the database works when I debug the program, and the database is stored in the project folder, and automatically transferred to the debug folder, as shown:
However, when I publish the project in order to make an executable, the database is not included in the publication. I have spent all day trying various walkthroughs online but I just don't seem to be able to get the publication to include the database or the necessary SQLite.Interop.dll file in the x64 and x86 folders in the Debug folder.
My published project looks like this:
With the following inside the Application Files folder:
I realise that I might be doing something stupid, or that I might just be going about this in the entirely incorrect way. If anyone could correct my flawed methods that would be very helpful!
Thanks
Upvotes: 0
Views: 5000
Reputation: 1
Just add a folder "Database" in your project and insert there your file.db
Then on Publish "Application files" include as dataFile your file.db
Upvotes: -1
Reputation: 2167
In regards to the comments some visual help for you:
Publish
tabApplication files...
Show all files
firstInclude
Required
.After a new publish the DB file should be contained in the Application Files
on your server.
EDIT: To make the file visible for the published application files you have to set its 'Build Action':
Upvotes: 2