-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLite - Design time unable to load e_sqlite3.dll #10596
Comments
You'll need to do a lot of AppDomain magic to make this work in-proc with VS. The AppDomainOperationExecutor was going to serve as the basis of our VS integration. |
Oh wait, you may just need to distribute |
As you can see from my description, I already do that, but the managed code seems to be looking for it in the wrong place. |
Looks like the search looks in:
|
Great, let me try "1" |
No luck... Looks like VS load a version of the sqlite driver of from
And calling SQLitePCL.Settings.BaseDirectoryForDynamicLoadNativeLibrary fails with "Typeload Exception" ??? ericsink/SQLitePCL.raw#188 |
Wondering if ths is a valid fix? aspnet/Microsoft.Data.Sqlite#249 (comment) |
Fixed! Base issue was that VS and some extension were using and loading various old versions of SQLite.PCL.raw My fix - wonder if there are some product changes that would make this easier? 1: Used a SQLite ADO.NET provider that includes the x86 sqlite3.dll as a resource (so no looking in the file system) iso Microsoft.Data.Sqlite 2: Implemented my "own" SqliteDatabaseModelFactory that uses the implementation above (which is System.Data.Sqlite.dll) - if I could do scaffolding with a IDbConnection, iso a connection string, I could maybe have avoided this extra code? |
Pulled myself together, and avoided code duplication: https://github.com/ErikEJ/SqlCeToolbox/blob/master/src/GUI/ReverseEngineer20/ReverseEngineer/CustomSqliteDatabaseModelFactory.cs |
When calling the design time service from a VS extension, it is unable to load the sqlite.dll. The file is present in the x86 folder below the sqlite provider and design time dll files. Copying the x86 file one level up does not work.
Pakcages.config:
Further technical details
EF Core version: 2.0.1
Database Provider: (e.g. Microsoft.EntityFrameworkCore.Sqlite)
Operating system: Win 10
IDE: (e.g. Visual Studio 2017 15.5.1)
The text was updated successfully, but these errors were encountered: