I have a test project targeting net452
, net461
, and netcoreapp20
. Everything runs fine under net452
and netcoreapp20
, however, when I run net461
I get a System.TypeInitializationException
here is the stack trace
Unhandled exception: System.TypeInitializationException: The type initializer for "MyApp.SomeClass" threw an exception. ---> System.ArgumentException: Path is invalid.
in System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
in System.IO.Path.InternalGetDirectoryName(String path)
in SQLitePCL.NativeLibrary.MakePossibilitiesFor(String basename, Assembly assy, Int32 flags, LibSuffix suffix)
in SQLitePCL.NativeLibrary.MyLoad(String basename, Assembly assy, Int32 flags, Action`1 log)
in SQLitePCL.NativeLibrary.Load(String libraryName, Assembly assy, Int32 flags)
in SQLitePCL.Batteries_V2.MakeDynamic(String name, Int32 flags)
in SQLitePCL.Batteries_V2.DoDynamic_cdecl(String name, Int32 flags)
in SQLitePCL.Batteries_V2.Init()
I check the project output for my test project and all the DLL's are there as well as SQLite.Interop.dll
in ./x86/
and ./x64/
By the way my main project, I am using Microsoft.Data.Sqlite and am targeting net40
, net461
, and netstandard20