View Ticket
Not logged in
Ticket Hash: 67d10c4262d45d2636f8f17334a013c92a93f792
Title: Could not load file or assembly System.Data.SQLite
Status: Closed Type: Code_Defect
Severity: Important Priority: Medium
Subsystem: NuGetPackage Resolution: Duplicate
Last Modified: 2018-11-07 02:14:32
Version Found In:
User Comments:
anonymous added on 2018-08-27 08:48:35:
OS: Windows 10 x64
Visual Studio 2017 v15.8.1

The nuget library System.Data.SQLite, Version= not work in a console  project NET CORE 2.0 (for DEMO)

Error message:
  Message=Could not load file or assembly 'System.Data.SQLite, Version=, Culture=neutral, PublicKeyToken=db937bc2d44ff139'.
The 'bin' directory not contains System.Data.SQLite.dll and the relative other libraries.
If you publish the project, the libraries exists into the directory 'bin' but the error returned during startup is the same.

Same problen in NET CORE 2.1 - ASP CORE 2.x ...
In NET Framework 4.x working correctly.


mistachkin added on 2018-08-28 01:01:51:
Do things work if you manually copy the files "System.Data.SQLite.dll" and
"SQLite.Interop.dll" to your application directory?

anonymous added on 2018-08-28 09:10:12:
I also had the problem with a .NET Framework 4.6.2 project. 

When I changed the nuget package version back to 1.0.108 it worked again.

anonymous (claiming to be kandlhans) added on 2018-08-28 09:18:10:
I'm using Framework 4.6.1 and since I have the same problem. If I copy System.Data.SQLite manually to the app directory then everything works.

anonymous added on 2018-08-28 11:22:28:
if i manually copy the files "System.Data.SQLite.dll" and
"SQLite.Interop.dll" to my application directory also not work

anonymous added on 2018-08-28 13:43:52:
Concerning my entry from
anonymous added on 2018-08-28 09:10:12

I think the problem was, that I was referencing System.Data.SQLite and System.Data.SQLite.Core at the same time.

mistachkin added on 2018-08-28 23:05:24:
I'm not sure why .NET Core refuses to load managed assemblies from the application
directory.  Perhaps it requires a different method of deployment?  I'm not sure.

mistachkin added on 2018-08-28 23:11:28:
Apparently, this is "by design" for .NET Core:

mistachkin added on 2018-08-28 23:21:04:
It may be possible to coax it into working by editing one of the many JSON files
that are used by the .NET Core SDK.  I'm not sure as the documentation is not
clear on this point.  It seems that

mistachkin added on 2018-08-28 23:31:30:
It appears to work if I get rid of all the JSON files except "ConsoleApp1.runtimeconfig.json" and then change that file to read:

  "runtimeOptions": {
    "tfm": "netcoreapp2.1",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "2.1.0"

mistachkin added on 2018-11-07 02:14:32:
Duplicate of [d292f2e23d].