MvvmCross 4 and WPF SQLite plugin

放肆的年华 提交于 2019-12-23 17:21:40

问题


In MvvmCross 4.0.0 the Community SQLite plugin has been replaced with new SQLite-PCL plugin (if I am not mistaken).

It works great in my Android application, but when I tried to use it in WPF application I faced problems.

  1. When package is installed from nuget there's no default Bootstrap file, therefore Mvx runtime fails to resolve classes like MvxSqliteConnectionFactory.
  2. When I add bootstrap code manually I get error like:

    A first chance exception of type Cirrious.CrossCore.Exceptions.MvxException occurred in WindowsBase.dll Version Unknown : Time 26/10/2015 08:53:16.232 PM: Error : 1.30 Exception: could not load plugin assembly for type MvvmCross.Plugins.Sqlite.PluginLoader

I figured that runtime is not able to load assembly probably because it does lookup by appending .Wpf suffix to the name of the plugin, so it looks for assembly MvvmCross.Plugins.Sqlite.Wpf or something like that. But there's no such library, in repository there's only WindowsUWP version.

What can I do to fix the problem and how do I use this plugin in WPF app?


回答1:


WPF plugin added to MvvmCross repos, please check out the latest prerelease version.



来源:https://stackoverflow.com/questions/33352520/mvvmcross-4-and-wpf-sqlite-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!