Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Library e_sqlite3 not found, is seen when application is run in x64 or AnyCPU. #1244

Open
Yaswanth112 opened this issue Jul 18, 2024 · 0 comments

Comments

@Yaswanth112
Copy link

I have a Windows installer application, but I'm having trouble running it on x64 or AnyCPU architecture.
Following is the error message I get 

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 IntPtr SQLitePCL.NativeLibrary.Load(string libraryName, Assembly assy, int flags)
   at IGetFunctionPointer SQLitePCL.Batteries_V2.MakeDynamic(string name, int flags)
   at void SQLitePCL.Batteries_V2.DoDynamic_cdecl(string name, int flags)
   --- End of inner exception stack trace ---
   at object RuntimeMethodHandle.InvokeMethod(object target, object[] arguments, Signature sig, bool constructor)
   at object System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(object obj, object[] parameters, object[] arguments)
   at object System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
   at void Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize()
   at static Microsoft.Data.Sqlite.SqliteConnection()

current project is in .NET4.6.2
Using Microsoft.Data.Sqlite.Core- 3.1.0
SQLitePCLRaw.bundle_e_sqlite3-2.0.2 and it dependent libraries

e_sqlite3.dll is created in both x64 and x86, but still i am getting the above error only in x64 bit architecture

@Yaswanth112 Yaswanth112 changed the title Exception: Library e_sqlite3 not found, is seen Only when application is run in x64 or Anycpu. Exception: Library e_sqlite3 not found, is seen when application is run in x64 or AnyCPU. Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant