3

So I'm trying to setup a cross-platform app with Xamarin for iOS + Android.

I included sqlite-net package in the PCL, and now I have dependency problems for either Windows 8, or Silverlight (that I both don't need to support).

If I chose a profile like profile24 which supports silverlight, I get the following error :

Error CS0234: The type or namespace name 'Stopwatch' does not exist in the namespace `System.Diagnostics'. Are you missing an assembly reference? (CS0234)

On the other hand, if I chose a profile like profile49 with windows 8 and windows phone 8, I get errors such as :

Error CS0117: 'System.Threading.Thread' does not contain a definition for `VolatileWrite' (CS0117)

Or with profile111 (windows 8 + windows phone 8.1) :

Error CS0103: The name `Thread' does not exist in the current context (CS0103)

Thing is, I don't need to support those platforms. But there is no profile including just Xamarin.iOS + Xamarin.Android. I am forced to support those platforms that bring trouble.

What can I do ?

1 Answer 1

6

Ok if anyone got the same problem : even though both are available in the package gallery, for use in a PCL, you have to include the SQLite.NET PCL package, and not the one named sqlite-net.

Update: also, if you want to use the async methods, you have to include the distinct package SQLite.Net.Async-PCL.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.