Unable to load DLL 'sqlite3' on windows.
See original GitHub issueI want to Scaffold-DbContext
with a sqlite database.
I use the PMC (Package Manage Console) in the Visual Studio 2015.
When I run the
Scaffold-DbContext -Connection "FileName=sqlite.db" -Provider Microsoft.EntityFrameworkCore.Sqlite
I get some error:
System.DllNotFoundException: Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Microsoft.Data.Sqlite.Interop.NativeMethods.Sqlite3_sqlite3.sqlite3_open_v2(IntPtr filename, Sqlite3Handle& ppDb, Int32 flags, IntPtr vfs)
at Microsoft.Data.Sqlite.Interop.NativeMethods.sqlite3_open_v2(String filename, Sqlite3Handle& ppDb, Int32 flags, String vfs)
at Microsoft.Data.Sqlite.SqliteConnection.Open()
at Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDatabaseModelFactory.Create(DbConnection connection, TableSelectionSet tableSelectionSet)
at Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDatabaseModelFactory.Create(String connectionString, TableSelectionSet tableSelectionSet)
at Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory.Create(String connectionString, TableSelectionSet tableSelectionSet)
at Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteScaffoldingModelFactory.Create(String connectionString, TableSelectionSet tableSelectionSet)
at Microsoft.EntityFrameworkCore.Scaffolding.Internal.ReverseEngineeringGenerator.GetMetadataModel(ReverseEngineeringConfiguration configuration)
at Microsoft.EntityFrameworkCore.Scaffolding.Internal.ReverseEngineeringGenerator.GenerateAsync(ReverseEngineeringConfiguration configuration, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContextAsync(String provider, String connectionString, String outputDir, String dbContextClassName, IEnumerable`1 schemas, IEnumerable`1 tables, Boolean useDataAnnotations, Boolean overwriteFiles, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<ScaffoldContextImpl>d__22.MoveNext()
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass4_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Further technical details
EF Core version: 1.1.0 EF Core Tools version: 1.1.0-preview4-final Database Provider: Microsoft.EntityFrameworkCore.Sqlite Operating system: Microsoft Windows [Version 10.0.14393] x64 IDE: Visual Studio 2015
Full project.json
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.EntityFrameworkCore.Sqlite": "1.1.0",
"Microsoft.EntityFrameworkCore.Sqlite.Design": {
"type": "build",
"version": "1.1.0"
},
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
"NETStandard.Library": "1.6.1"
},
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Unable to load DLL 'sqlite3': The specified module could ...
Hi, you need to right click on "References" -> "Manage NuGet Packages". On the "Browse" tab look for "System.Data.SQLite". Install it. No need ......
Read more >Unable to load DLL 'sqlite3': The specified module could ...
I am getting the following error while trying to run UWP app that has reference to "sqlite-net-pcl". My situation is little complicated.
Read more >System.DllNotFoundException: Unable to load DLL 'sqlite3'
Our application environment Uwp, hololens2, arm architucture I have a scenario, where I am using sqlite3 for my local DB.
Read more >Unable to load DLL 'sqlite3': The specified module could ...
I am working on a windows forms application. when I run the application on windows 8.1 (VS2013), the application runs upto an extent...
Read more >Unable to load DLL 'sqlite3': The specified module could ...
When I run the app in Unity, everything works fine but when I debugg the app in the hololens, it throws an exception...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, what is the solution?
@Mardoxx Can you submit a new issue describing your scenario? A lot has changed since this issue was created.