ARTICLE AD BOX
I am getting the below exception in my .NET Framework application targeting version 4.7.2 -- platform set as Any CPU. I have tried many things but couldn't succceed.
I tried the exact same code and configuration of the official sample app which works fine for me when I set the target framework as .NET 8. However, I receive the exception when I use the same code and configuration in a sample .NET Framework 4.7.2 application.
https://github.com/dotnet/docs/tree/main/samples/snippets/standard/data/sqlite/HelloWorldSample
Library e_sqlite3 not found plat: win suffix: DLL possibilities (3): 1) C:\work\ConsoleApp9\ConsoleApp9\bin\Debug\runtimes\win-x86\native\e_sqlite3.dll 2) C:\work\ConsoleApp9\ConsoleApp9\bin\Debug\e_sqlite3.dll 3) C:/work/ConsoleApp9/ConsoleApp9/bin/Debug/e_sqlite3.dll win TryLoad: C:\work\ConsoleApp9\ConsoleApp9\bin\Debug\runtimes\win-x86\native\e_sqlite3.dll thrown: System.ComponentModel.Win32Exception (0x80004005): The specified module could not be found at SQLitePCL.NativeLibrary.TryLoad(String name, Loader plat, Action`1 log, IntPtr& h) win TryLoad: C:\work\ConsoleApp9\ConsoleApp9\bin\Debug\e_sqlite3.dll thrown: System.ComponentModel.Win32Exception (0x80004005): The specified module could not be found at SQLitePCL.NativeLibrary.TryLoad(String name, Loader plat, Action`1 log, IntPtr& h) win TryLoad: C:/work/ConsoleApp9/ConsoleApp9/bin/Debug/e_sqlite3.dll thrown: System.ComponentModel.Win32Exception (0x80004005): The specified module could not be found at SQLitePCL.NativeLibrary.TryLoad(String name, Loader plat, Action`1 log, IntPtr& h) NOT FOUND