I am getting the below exception in my .net framework application targeting to .net 4.7.2 and platform set as Any CPU. I have tried many things but couldn't succceed. Then 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. But it gives the same exception when I use the same code and configuration in a sample.net 4.7.2 framework 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
basically I’m using this way to run my application on x64 and arm64 devices.
https://devblogs.microsoft.com/visualstudio/how-to-run-net-apps-natively-on-arm64-devices/#how-to-use-the-setting-in-visual-studio-2022
My main target is now x64 and arm64, I’m fine even if it doesn’t work with 32bit.
I have also tried with System.Data.SQLite, but no luck with it as well.
I am getting the below exception in my .net framework application targeting to .net 4.7.2 and platform set as Any CPU. I have tried many things but couldn't succceed. Then 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. But it gives the same exception when I use the same code and configuration in a sample.net 4.7.2 framework application.
https://github.com/dotnet/docs/tree/main/samples/snippets/standard/data/sqlite/HelloWorldSample
basically I’m using this way to run my application on x64 and arm64 devices.
https://devblogs.microsoft.com/visualstudio/how-to-run-net-apps-natively-on-arm64-devices/#how-to-use-the-setting-in-visual-studio-2022
My main target is now x64 and arm64, I’m fine even if it doesn’t work with 32bit.
I have also tried with System.Data.SQLite, but no luck with it as well.