首页 > 解决方案 > 'Microsoft.Data.Sqile.SQliteConnection' 的类型初始化程序引发异常 C#

问题描述

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.TypeInitializationException: The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Library e_sqlite3 not found
   at SQLitePCL.NativeLibrary.Load(String libraryName, Assembly assy, Int32 flags)
   at SQLitePCL.Batteries_V2.MakeDynamic(String name, Int32 flags)
   at SQLitePCL.Batteries_V2.DoDynamic_cdecl(String name, Int32 flags)
   at SQLitePCL.Batteries_V2.Init()
   --- End of inner exception stack trace 

当我在执行应用程序时创建项目的设置文件时收到此消息。但是当我在 Visual Studio 中调试它时,它运行良好并且没有任何问题。

标签: c#system.data.sqlite

解决方案


推荐阅读