2
votes

I have a Windows 8.1 Store Application. It has a background task project (Windows Runtime Component). In that project I add a reference of sqlite-net in the similar way as I did for the Store app. The WinRT component Project does not compile and gives me this error.

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)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd' from the list of referenced files. C:\Users\admin\Desktop\BackgroundTaskProject\WINMDEXP BackgroundTaskProject

I want to fetch data from the Sqlite DB and send to a web service periodically in background in the application.

1
It looks pretty well explained in the error message. You must remove one of the referencesjean
@jean : In my list of references. I have : 1) .NET for Windows Store App. 2) Microsoft Visual C++ 2013 Runtime Package for Windows 3) Sqlite for Windows Runtime (Windows 8.1) 4) Windows 8.1 2 and 3 are interdependant. Which reference should I remove ? :-pDenil Parmar
you are speaking of other kind of references. That winmd files stand for metadata so expect to find some kind of metadata on your backgroundTaskProject properties. If the error message is correct you are trying to load the same specification (metadata) from two diferent sources (Kits & SDK)jean

1 Answers

4
votes

Finally Got this Working,


  1. Adding the reference of sqlite-net in my Windows runtime Component was creating a lot of problems so I created a new Project in my existing Solution of type "Class Library Project".
  2. Added a reference of Sqlite-net in my Class Library Project.
  3. In the Class Library Project Class1, I created a new static sqlite connection object.
  4. Added the reference of Class Library Project in the WinRT Component Project's references.
  5. Then using this I was able to access the static connection object and its methods such as Query<>().....

Hope this helps for everyone...