开发者

When using SQLite what do I have to have in end users machines?

This program will run 100% independently from anyone. Just the guy and his computer.

The SQLite database is just a little .db file right? I've also downloaded a driver for accessing the SQLite database using Entity Framework.

What would I need 开发者_C百科to deploy on a users machine? Just the folder with the .exe and the .db file?

Thanks.


Since you indicate that your app is C# and SQLite is written in C, you must be referencing the SQLite DLL. When you distribute your app to the customer, you will need to include your exe, the SQLite DLL, and the MSVCRT.DLL that the SQLite DLL depends upon. If you have prebaked data in a database that needs to accompany your app, you can distribute that with your code as well. If there is no prebaked data, you can programatically create a new empty .db on the customer's machine the first time your app loads.

The SQLite DLL and its MSVCRT dependency can just be copied into the same directory as the app exe. It's just an "xcopy install", no registry settings or MSIs required for SQLite.


The computers on which your app is installed will need:

  • Access to the SQLite libraries (in the CWD, GAC or a configurable location). Anything SQLite is dependent on (file helpers, IoC) must also be included, but most of these third-party tools have their dependencies IL-Merged so you only have to worry about libraries belonging specifically to SQLite.
  • Access to the .db file (if you're not using in-memory SQLite; again, it can be in the CWD or a configurable location)


If you use the System.Data.SQLite library all you need to deploy is their one System.Data.SQlite.dll (about 900kb) in the same folder as your app, along with whichever .db files your app uses.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜