简体   繁体   中英

Trying to debug PCL code with MVVMCross and SQLite plugin

I created a PCL using MVVM Cross and the SQLite plugin (under VS2012)

In my Droid code, I initialize the service like this:

        Cirrious.MvvmCross.Plugins.Sqlite.PluginLoader.Instance.EnsureLoaded();

And in my PCL code :

        var factory = this.GetService<ISQLiteConnectionFactory>();
        var conn = factory.Create("shopbazar");

but I receive the following error when calling the PLC code:

 Could not load type 'SQLite.SQLiteConnection' from assembly 'Cirrious.MvvmCross.Plugins.Sqlite.Droid…

Any idea?

I set rights for "Internet" and "Write To External Storage" in my Android assembly.

By the way, I cannot step into this piece of code because the debugging in not entering the PCL. Any other idea?

For debugging in VS2012 I'm afraid sometimes you simply have to drop down to VS2010.

I can only suggest you add your voice to this https://bugzilla.xamarin.com/show_bug.cgi?id=8209 and also ask about it on the Xamarin forums at http://forums.xamarin.com/discussion/286/pcl-debugging-in-vs2012

I have asked about it - but ignored so far :(


For getting SQLite to work, take a look at the sample - https://github.com/slodge/MvvmCross/tree/vnext/Sample%20-%20SimpleDialogBinding/SimpleDroidSql - does that work for you? If it does, then we'll need to spot the difference... if it doesn't then we'll need to work out what to do in your version of Droid - vive les differences!


For more general info about the current state of mono* and PCL setup and tooling in VS, see:

http://slodge.blogspot.co.uk/2012/12/cross-platform-winrt-monodroid.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM