SQLite Forum

SQLite.Interop.dll and NetStandard
Login

SQLite.Interop.dll and NetStandard

(1) By anonymous on 2021-07-01 09:49:10 [link]

Hi, i tried to make a blazor webassembly projekt and currently i cant use System.Data.SQlite because the SQLite.Interop.dll apparently can not be found.

> System.DllNotFoundException: SQLite.Interop.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(System.Data.SQLite.SQLiteConfigOpsEnum)
  at System.Data.SQLite.SQLite3.StaticIsInitialized () <0x2f0a020 + 0x00034> in <filename unknown>:0 
  at System.Data.SQLite.SQLiteLog.PrivateInitialize (System.String className) <0x2f096d8 + 0x00044> in <filename unknown>:0 
  at System.Data.SQLite.SQLiteLog.Initialize (System.String className) <0x2f029d0 + 0x0003a> in <filename unknown>:0 
  at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString, System.Boolean parseViaFramework) <0x2eac638 + 0x00032> in <filename unknown>:0 
  at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString) <0x2e8b488 + 0x00008> in <filename unknown>:0 
  at Echo.Pages.Counter.IncrementCount () [0x00001] in C:\Users\Robert\source\repos\Echo\Echo\Pages\Counter.razor:18 
  at Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync[T] (System.MulticastDelegate delegate, T arg) <0x2e63698 + 0x0006e> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync (System.Object arg) <0x2e635d8 + 0x0000a> in <filename unknown>:0 
  at 
Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync (Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, System.Object arg) <0x2e63538 + 0x0000a> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.EventCallback.InvokeAsync (System.Object arg) <0x2e630c0 + 0x00040> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.RenderTree.Renderer.DispatchEventAsync (System.UInt64 eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo fieldInfo, System.EventArgs eventArgs) <0x2e605f8 + 0x000a8> in <filename unknown>:0

I am currently using Visual Studio Community 2019 16.10.3 and .NET SDK 5.0.301.

I saw there is a workaround for the problem, but not for .Net Standard 2.1

The SQLite.Interop.dll is currently located under 

> C:\\Users\\$User\\.nuget\\packages\\stub.system.data.sqlite.core.netstandard\\1.0.114.3\\runtimes

but not in the project folder. Maybe i can copy the dll manually?

Maybe someone has an idea to make the package work again.

(2) By mistachkin on 2021-07-01 18:33:58 in reply to 1 [link]

Maybe this is related to the <u>[recent MSBuild issue](https://sqlite.org/forum/forumpost/50a6f798876b5a18?t=h)</u>?

(3) By anonymous on 2021-07-02 06:00:22 in reply to 2

This was my thought also. But i can't use the workaround because a .net standard project doesn't have this folder/file.


I tried to copy the .dll files by hand to 

> C:\\Users\\$User\\source\\repos\\Echo\\DataLibrary\\bin\\Debug\\netstandard2.1\\x86
C:\\Users\\$User\\source\\repos\\Echo\\DataLibrary\\bin\\Debug\\netstandard2.1\\x64

but with no luck and at the moment i am pretty clueless what to do next.

When i run 

> dotnet build --version 

i get 

>Microsoft (R)-Build-Engine, Version 16.10.1+2fd48ab73 für .NET
>Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
>
>16.10.1.27001

although i am using VS 16.10.3. I dunno how the change this. Everything should be up to date.

(4) By anonymous on 2021-07-02 06:14:33 in reply to 3 [link]

I think i have to wait for an update vor MSBuild 16.10.2?

> This version of MSBuild shipped with Visual Studio 2019 version 16.10.2 and will ship with .NET SDK 5.0.302.