|Title:||SQLite Database not being copied|
|Last Modified:||2016-03-28 22:16:18|
|Version Found In:||1.0.99|
anonymous added on 2016-03-13 16:02:17:
In Visual Studio 2015 I am using System.Data.SQLite. My project works perfectly in VS. My database is in /bin/debug. When I deploy the project the database isn't being found. I assume it isn't being copied or something else is happening. Can you help with this? Thanks.
mistachkin added on 2016-03-13 22:42:34:
The database file is not copied by System.Data.SQLite. It is the responsibility of the application developer to copy it during the deployment process. That being said, you can use a relative file name for the "Data Source" connection string property and the database file will end up in the current directory (which may be the application binary directory). However, it is normally better to use a fully qualified path to a database file that is *NOT* in one of the build output directories (i.e. this prevent the database from being accidentally deleted during the build, etc).