我剛開始使用MVX,因此希望我已經提供足夠的重現。無法加載類型爲Cirrious.MvvmCross.Plugins.WebBrowser.PluginLoader的插件程序集。
摘要:
創建忍者和選擇JSON和web瀏覽器插件,新的解決方案。當WPF應用程序運行時,會出現在拋出異常:WPF> App.xaml.cs> DoSetup> setup.initialize()
注:
如果只添加了JSON的插件,這個錯誤不會發生。
步驟:
- 打開VS2013(所以沒有項目/解決方案應該是開放的)
- 確保忍者編碼器插件是使用3.2.0
- 轉到工具>忍者編碼器安裝... >添加項目
- 在「構建選項」屏幕上,單擊下一步
- 在框架上,單擊下一步
- 在項目詳細信息,添加項目名稱「MvxTest」,CLI CK接下來
- 上查看型號,然後單擊下一步
- 在插件中,選擇 'Json的' 和 'web瀏覽器'
- 上的NuGet,選擇 'Newtonsoft的Json'
- 單擊Finish
- 讓一切獲得創建
- 集 「MvxTest.WPF」 作爲啓動項目
- 開始WPF項目
錯誤:
An unhandled exception of type 'Cirrious.CrossCore.Exceptions.MvxException' occurred in Cirrious.CrossCore.dll
Additional information: could not load plugin assembly for type Cirrious.MvvmCross.Plugins.WebBrowser.PluginLoader
at Cirrious.CrossCore.Plugins.MvxFilePluginManager.LoadAssembly(Type toLoad)
at Cirrious.CrossCore.Plugins.MvxFilePluginManager.FindPlugin(Type toLoad)
at Cirrious.CrossCore.Plugins.MvxPluginManager.ExceptionWrappedLoadPlugin(Type toLoad)
at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePlatformAdaptionLoadedT
at Cirrious.MvvmCross.Plugins.WebBrowser.PluginLoader.EnsureLoaded()
at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoaded(IMvxPluginLoader pluginLoader)
at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoaded(Type type)
at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoadedTType
at Cirrious.CrossCore.Plugins.MvxPluginBootstrapAction1.Load(IMvxPluginManager manager) at Cirrious.CrossCore.Plugins.MvxPluginBootstrapAction1.RunAction()
at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.InternalSetResolver(Type tInterface, IResolver resolver)
at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.RegisterSingleton(Type tInterface, Object theObject)
at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.RegisterSingletonTInterface
at Cirrious.CrossCore.Mvx.RegisterSingletonTInterface
at Cirrious.MvvmCross.Platform.MvxSetup.InitializePluginFramework()
at Cirrious.MvvmCross.Platform.MvxSetup.InitializeSecondary()
at Cirrious.MvvmCross.Platform.MvxSetup.Initialize()
at MvxTest.Wpf.App.DoSetup() in c:\DEVn\MvxTest\MvxTest.Wpf\App.xaml.cs:line 32
at MvxTest.Wpf.App.OnActivated(EventArgs e) in c:\DEVn\MvxTest\MvxTest.Wpf\App.xaml.cs:line 48
at System.Windows.Application.WmActivateApp(Int32 wParam)
at System.Windows.Application.AppFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
作爲一個側面說明...我不知道忍者插件最近已經或沒有更新。我會建議手動添加最新的軟件包,看看你是否仍然有這個問題。 – PkL728