Forum Cross Platform with Xamarin

Importing a Windows Store App Class Library (with SQLite-net) into an iOS project

Hi,

I am currently developing an iOS application in Xamarin, and i am required to share codebase with an existing project which targets Windows Store apps.

The Windows Store apps has a Class Library which i am building and trying to reference in my iOS project, but i get FileNotFoundExceptions when i try to run the application.

To make it simple, here is my problem. I create a "Class Library (Windows Store apps)" in Visual Studio and create a few simple classes and methods which utilize SQLite-net (creating tables and such). I build this small project and add it into my Xamarin iOS project as a reference, i get the following errors:


2013-09-30 14:09:45.022 IncludeTestProject[1594:1503] MonoTouch: Socket error while connecting to MonoDevelop on 127.0.0.1:10000: Connection refused
Missing method get_Current in assembly /Users/xxxx/Downloads/IncludeLibTest2.dll, type Windows.Storage.ApplicationData
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
at SQLite.SQLiteConnection..ctor (System.String databasePath, Boolean storeDateTimeAsTicks) [0x00000] in :0
at IncludeLibTest2.IncludeLibClass2.CreateConnection (System.String path) [0x00000] in :0
2013-09-30 14:09:45.360 IncludeTestProject[1594:a0b] Unhandled managed exception: Could not load file or assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' or one of its dependencies. (System.IO.FileNotFoundException)
at SQLite.SQLiteConnection..ctor (System.String databasePath, Boolean storeDateTimeAsTicks) [0x00000] in :0
at IncludeLibTest2.IncludeLibClass2.CreateConnection (System.String path) [0x00000] in :0

I have experimented around a little, and i don't get any errors when i reference a project which has no SQLite-net references in it. Also, if i create a generic "Class Library" project i can use SQLite-net references in it, build it and use the DLL in my Xamarin iOS project. However, the above error arises specifically when i create a Windows Store app Class Library with the SQLite-net reference. At the moment i am required, however, to use that specific project type as codebase in my project. Any tips?

I realize this is a very specific problem, feel free to ask more questions regarding this project and i will try my best to answer them. Any help is appreciated.

Cheers

Sign In or Register to comment.