In my UWP solution I have a C++/CX project which uses a SQLite database. I used the extension for Visual Studio 2015 called 'SQLite for Universal App Platform' to access SQLite db's. I decided to upgrade VS2015 Professional to VS2017 Community Edition. That went well and for some reason I decided to upgrade to the extension 'SQLite Universal Windows Platform v3.20.1' after uninstalling the old extension. Then I added the new extension in the reference manager.
When building the solution I got the error in the C++/CX project that the SDK 'SQLite.UWA.2015, Version 3.9.2' could not be found. This makes sense, so I changed all strings in the vcxproj file of the C++/CX project to 'SQLite.UWP.2015, Version 3.20.1'. Now I get the error:
fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory
I added manually the 'sqlite3.lib' to the Additional Dependencies, because that somehow got erased at some point in time. This however did not help.
Anyone an idea, what the problem might be or what to check?
I'm developing application by using Xamarin Forms. I need database so I install sqlite-net-pcl by Frank A.Krueger via NuGet package manager. I try to get connection in PCL project:
ISQLiteHelper sqlLiteHelper = DependencyService.Get<ISQLiteHelper>();
string pathToDatabaseFile = sqlLiteHelper.GetLocalDatabaseFilePath(databaseFilename);
this.database = new SQLiteConnection(pathToDatabaseFile);
But I got an exception.
"Unable to load DLL 'e_sqlite3': The specified module could not be
found. (Exception from HRESULT: 0x8007007E)"
I followed by some answers and download and installed sqlite-wp81-winrt-3180000.vsix Than I added the following references into my WinPhone 8.1 project: Reference Manager -> Windows Phone 8.1 -> Extensions -> SQLite for Windows 8.1 But it did not help me. I got the same error.
I changed my target platform to x86. For Any CPU I get an error:
"Any CPU" is not supported by the referenced SDK "Microsoft.VCLibs,
Version=12.0". Please consider changing the targeted processor
architecture of your project (in Visual Studio this can be done
through the Configuration Manager) to one of the architectures
supported by the SDK: "x86, ARM". App1.WinPhone
I got that error if I change my target platform to x64 like my PC has.
"X64" is not supported by the referenced SDK "Microsoft.VCLibs,
Version=12.0". Please consider changing the targeted processor
architecture of your project (in Visual Studio this can be done
through the Configuration Manager) to one of the architectures
supported by the SDK: "x86, ARM". App1.WinPhone
"X64" is not supported by the referenced SDK "SQLite.WP81,
Version=3.18.0". Please consider changing the targeted processor
architecture of your project (in Visual Studio this can be done
through the Configuration Manager) to one of the architectures
supported by the SDK: "x86, ARM". App1.WinPhone
SOLUTION: You can use SQLite.Net-PCL by Oustein Krog, Frank Krueger, Tim Heuer instead of sqlite-net-pcl.
The creation of collection will look like this one:
this.database = new SQLiteConnection(databaseFilename);
I'm having toubles with SQLite library.
I have to add some functionality to one legacy project (and therefor I need SQLite DB).
I've tried https://system.data.sqlite.org/downloads/1.0.94.0/sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.94.0.zip, but anytime when debugger tries to get into function which contains SQLite calls (SQLiteConnection, SQLiteCommand) I get error:
Could not load type 'System.Data.SQLite.SQLiteConnection' from assembly 'System.Data.SQLite, Version=1.0.94.0, Culture=neutral, PublicKeyToken=1FDB50B1B62B4C84'.
File System.Data.SQLite.dll is added to References by standard way.
File SQLite.Interop.094.dll is added to root of the project and is set to BuildAction: Content and Copy to output..: Copy if newer.
Target device: Windows Mobile 6.1
Visual Studio 2005
Target platform: Windows Mobile 6 Professional SDK
Thanks for any help...
At first glance it looks good. So you have the two Sqlite-DLLs in your application-path? But, you are running Visual Studio 2005, so I guess you only have CompactFramework 2.5. Can you use Sqlite in the version for compact framework 3.5? If yes, please check if you have installed CF3.5 on your device (\Windows\cgautil.exe)
Update: Version 1.0.94 is NOT working properly. I fails on SQLiteConnection.Open() (Method not found.... or Mising method...).
Please use version 1.0.66. Solution found at SQLite Interop DLL Missing Method - Windows Mobile CF
I would like to use the SQLite-Net Extensions library in my winRT project.
https://bitbucket.org/twincoders/sqlite-net-extensions
To support sqlite in my Windows 8.1 App I've currently installed SQLite for Windows Runtime (Windows 8.1) as VS Extension and sqlite-net via NuGet.
Extension: http://visualstudiogallery.msdn.microsoft.com/1d04f82f-2fe9-4727-a2f9-a2db127ddc9a
sqlite: https://www.nuget.org/packages/sqlite-net
To get it working I tried to download the source and build it with the sqlite libs we can use for winRT. In order to add a reference to SQLite for Windows Runtime I need to change the target to Windows 8.1 only. Doing that will result in many errors like: "The name 'BindingsFlags' does not exist in the current context" "Instance argument: cannot convert from 'System.Type' to 'System.Reflection.MemberInfo'"
I've also tried to link the SQLite-Net-PCL directly from my project but in the end it's the same situation.
I really need to add relationships to my sqlite database and would be very very thankful for every help I can get!
Attached you can find a screenshot of my VS2013 where I've changed the references of SQLiteNetExtensions to use the required winRT libraries.
Many many thanks in advance for any help you can give me!
Following steps work for me without the need to download the source and possible compilation error:
(I have the following assumptions: I only target Windows 8.1 [As of yours] and I use Visual Studio Premium 2013 Update 3)
In Visual Studio go to Tools-Extensions & updates-online section and look for sqlite. This package will contain
required SQLite Binaries.
Add a Reference to SQLite for Windows Run-time in your project Reference
Add a Reference to Microsoft Visual C++ Run-time package
In Nuget package manager console run "Install-package sqlite-net"
In Nuget package manager console run "Install-Package SQLiteNetExtensions"
Now you will have a project which Targets Windows 8.1 and also has reference to both SQLiteNetExtensions. Above steps was originally recommended in : Using SQLite in a Windows Store App
Below is the screenshot of the SQLiteDemo project references downloaded from the link I mentioned earlier which also has reference to SQLiteNetExtensions :
I am currently using SQLite for Windows Forms but while running the project it is showing the error:
Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I had added the DLL of System.Data.SQLite.dll but it is showing the same error. Please can any one help me by giving the perfect answer regarding this problem? Thanks in advance
This should fixed my issue.
Add the following DLLs.
Microsoft Visual C++ Runtime Package
SQLite for Windows Runtime
Use Project "Add Existing Item" and select the sqlite3.dll "As link". Click OK. Choose DLL in project and set "Copy Local" value to True.
Maybe you haven't added the version for the right platform? SQLite is distributed with one X86 (32 bit) assembly and one X64 (64 bit) assembly.
If your application is a 32 bit application you should use the System.Data.SQLite.dll located in the "bin" directory of the System.Data.SQLite distribution, if it is a 64 bit application you should use the one in "bin\x64".
However, from looking at the error message a second time I'm not sure if that's it. Are you making native calls to SQLite? In that case you may have to rename the dll to sqlite3.dll.
As you may know System.Data.SQLite is a bundling of the original native sqlite3.dll and a managed ADO.NET provider (unless you are using some old version in which case I'm not sure - you might need the native sqlite3.dll separately)
In my case I'm working on a UWP project. I had to add a reference to Visual C++ 2015 Runtime for Universal Windows Platform Apps and the error was gone. It can be added in the Reference Manager under Universal Windows > Extensions. Detailed solution can be found here.
After struggling for 3 days,finally found a way to resolve.
As of March 2018,if you try to use sqlite-net via Nuget Package Manager,it adds two files and few reference dlls to your solution independent of type of project UWP or Android etc.
And after that if you compile and run the solution will fail with an exception
Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
This is because it is unable to load sqlite3.dll as it is not added to the solution via NUGET package manger.So you need to add it manually.
To add,first determine your project is 32 bit or 64 bit then download the respective Precompiled Binaries for Windows Runtime from https://www.sqlite.org/download.html and add them manually (copy and paste).
So now your solution will look like below one and it will run without issues.
I had the same issue when I downloaded the latest sqlite provider and I tried a solution from here but it didnt work, hence I downloaded the earlier version and its works fine.
Had this problem recently - after attaching procmon to my process, I found that the latest System.Data.SQLite libs (the ones built for .NET4) have a dependency on the MSVC 2010 runtime, and the servers didn't have this installed. Fortuantly, this can be pulled down from the Microsoft website.
I had exactly the same problem for the UWP project in a Xamarin.Forms application.
Adding reference to "SQLite for Universal Windows Platform" to the UWP project solved the problem.
Copy sqlite3.dll to the System32 folder. It worked for me. And thanks too!
I'm building a native Windows Phone 8.1 app with a PCL and a Droid project. I had the same error and I put the reference to the right version of sqlite3.dll (wpa81) and all worked.
Especially if you've updated to Visual Studio 2015 RTM and are developing Universal Windows apps, try uninstalling the SQLite for Universal App Platform extension and reinstalling (see http://sqlite.org/download.html).
All of these seem to be solutions for certain situations. For me, and for #Marlon Ticao on this page, the application just can't find the DLL.
There are 2 solutions. Copy it to a directory that is in you path (such as System32) or you can copy it into the same directory that your executable is.
I had this exact problem using a 3rd party built sqlite3.dll -- the app would not launch. I used the dependency walker to find that this sqlite3.dll had a dependency on msvcr110.dll. Once I included this file, all was well.
Don't forget to deploy the published runtimes folder too in .NET (Core) projects, it should contain that DLL for various targets.