I can't include SqLite in my Windows app packaging project, what should I do ? RRS feed

  • Question

  • There is a WPF application that uses SqLite as a local database. When creating a package package of Windows-based applications do not have libraries e_sqlite3.

    Exception: DllNotFoundException: Unable to load DLL "e_sqlite3": the specified module could not be found. (Exception from HRESULT: 0x8007007E)

    When adding to manual encounter another problem, can not find the database: exception: SQLite Error 14: 'unable to open database file' with EF Core code first

    Development environment: Windows 10, Visual Studio 2017, Microsoft.EntityFrameworkCore.Sqlite and Microsoft.Data.Sqlite

    Saturday, February 2, 2019 9:10 PM

All replies

  • Hi,

    Let's clarify something first. Do you mean you have a WPF application and you want to convert it to UWP application using Windows Application Packing Project(WAPP)? Have your tried to run the WAPP app in released mode to see if there are any problems? Does the SqLite file is stored in the WPF application's project or it is stored in the local device?

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, February 4, 2019 5:49 AM
  • Yes, I tried to run in WAPAlso tried to create a package and from it to put the application, but in both cases the problem of lack of sqlite.

    The WPF application itself is working and when compiled, the x64 and x86 folders containing e_sqlite3 are created.dll, but the WAP during compilation and installation, the data folder and of course places without dll. Tried to add statically data of library to put, displays errors: SQLite Error 14: 'unable to open database file' with EF Core code first.

    When you first start the application, the database is missing and a db is created.Database.Migrate();

    • Edited by MacroMax Monday, February 4, 2019 6:49 AM
    Monday, February 4, 2019 6:48 AM
  • I'm having the exact same issue.  My WPF app uses SQLite.  When running the WPF app on its own, it works fine.  But when running it through my DesktopBridge Package project, it fails with that "Unable to load DLL 'e_sqlite3'" error.  If I manually copy in the DLL, it gets the "unable to open database file" error when calling DbContext.Database.EnsureCreated().
    Saturday, March 9, 2019 12:11 PM