Skip to content
This repository was archived by the owner on Nov 1, 2018. It is now read-only.

sqlite3.dll not found in ASP.NET 4 applications #278

Closed
natemcmaster opened this issue Jul 15, 2016 · 1 comment
Closed

sqlite3.dll not found in ASP.NET 4 applications #278

natemcmaster opened this issue Jul 15, 2016 · 1 comment

Comments

@natemcmaster
Copy link
Contributor

natemcmaster commented Jul 15, 2016

Repro

Create ASP.NET 4 web application
Add Microsoft.Data.Sqlite 1.0.0
Add code that calls SqliteConnection.Open()

Error
DllImportException "sqlite3.dll" not found

Reason
Despite the build appropriately places sqlite3.dll in to bin/x86 and bin/x64, ASP.NET sets AppDomain.CurrentDomain.BaseDirectory to the project root, but NativeLibraryLoader needs to use "$projectRoot/bin"

VitaliyMF added a commit to VitaliyMF/Microsoft.Data.Sqlite that referenced this issue Jul 28, 2016
@VitaliyMF
Copy link

I've faced the same issue as @natemcmaster, bug can be reproduced when Microsoft.Data.Sqlite is used from .NET 4.5.1 ASP.NET application. The fix is rather trivial: #280

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants