Question

Currently, I am trying to retarget my windows store app to windows 8.1 preview. The problem is, that I used sqlite-net package in one of my project. I followed steps described here: http://www.lyalin.com/2013/07/09/sqlite-for-windows-runtime-for-windows-8-1-apps/ and downloaded pre-release version of sqlite visual studio extension from this link: http://www.lyalin.com/2013/07/09/sqlite-for-windows-runtime-for-windows-8-1-apps/. I have added a reference to a newly installed sqlite for windows runtime in my project, but I got an error while building:

Error   2   Windows Runtime type 'Windows.Foundation.Point' was found in
multiple referenced winmd files. Please remove either 'C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral\platform.winmd'
or 'C:\Program Files (x86)\WindowsKits\8.1\References\CommonConfiguration\Neutral\Windows.winmd' 
from the list of referenced files.  C:\Users\Jarosław\Desktop\BCM\Win8Client\MetriceModel\WINMDEXP
MetriceModel (Windows 8.1)

Somewhere, on one of the forums somebody hinted, that if you remove reference to microsoft visual c++ runtime package from the project, it will solve the problem. After I did that whole solution compiled fine, but I got a following exception at runtime:

 Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Exception is thrown at a line:

#if NETFX_CORE
        SQLite3.SetDirectory(/*temp directory type*/2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
#endif

of SQLite.cs file (file is from mentioned earlier sqlite-net package).

Project's folder bin/Debug/AppX contains file sqlite3.dll. Every project in my solution has x86 as a platform target. How do I fix this issue? Before migrating the project everything worked fine.

Was it helpful?

Solution

You must install the official version of vsix package on sqlite download page (v3.8.0.2).

In the Visual Studio Add-in manager, this package version is 3.7.1.17 and it's not correct.

After, i think it is a bug, you have to select the good processor (platform target).

I had the same error because I deployed a migrated winrt application (8.1) compiled in x86 on a x64 machine... => in windows 8.0 it works, but not in windows 8.1.

If you have a x64 machine you have to select the x64 target compilation. I hope it will be fixed in futur...

OTHER TIPS

can you please re-install the preview of SQLite for WinRT 8.1? There was an issue with the initial package, but we worked with them to update. http://sqlite.org/download.html

If you have an exception with

SQLite3.SetDirectory(/*temp directory type*/2,windows.Storage.ApplicationData.Current.TemporaryFolder.Path);

Check if your project uses x86 and not any CPU

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top