2

I have a problem to load MVVMCross library loaded by NuGET (as N video suggest). This is my pluginloader:

        private void InitialisePlugins()
        {
            PluginLoader.Instance.EnsureLoaded();

            Cirrious.MvvmCross.Plugins.File.PluginLoader.Instance.EnsureLoaded();
            Cirrious.MvvmCross.Plugins.JsonLocalisation.PluginLoader.Instance.EnsureLoaded();
            Cirrious.MvvmCross.Plugins.ResourceLoader.PluginLoader.Instance.EnsureLoaded();
            Cirrious.MvvmCross.Plugins.Messenger.PluginLoader.Instance.EnsureLoaded();
       }

Exception (seems that file is not loaded, but it's copied in directory output):

>     06-25 16:57:27.538 I/mvx     (  717):   4.21 Setup: PluginManagerFramework start
>     mvx:Diagnostic:  4.21 Setup: PluginManagerFramework start
>     [0:] mvx:Diagnostic:  4.21 Setup: PluginManagerFramework start
>     06-25 16:57:27.611 I/mono-stdout(  717): mvx:Diagnostic:  4.21 Setup: PluginManagerFramework start
>     [0:] 
>     06-25 16:57:27.708 I/mvx     (  717):   4.38 Setup: App start
>     mvx:Diagnostic:  4.38 Setup: App start
>     [0:] mvx:Diagnostic:  4.38 Setup: App start
>     06-25 16:57:27.788 I/mono-stdout(  717): mvx:Diagnostic:  4.38 Setup: App start
>     [0:] 
>     06-25 16:57:27.949 I/mvx     (  717):   4.62 Loading plugin assembly: Cirrious.MvvmCross.Plugins.File.Droid.dll
>     mvx:Diagnostic:  4.62 Loading plugin assembly: Cirrious.MvvmCross.Plugins.File.Droid.dll
>     06-25 16:57:28.028 I/mono-stdout(  717): mvx:Diagnostic:  4.62 Loading plugin assembly: Cirrious.MvvmCross.Plugins.File.Droid.dll
>     [0:] mvx:Diagnostic:  4.62 Loading plugin assembly: Cirrious.MvvmCross.Plugins.File.Droid.dll
>     Unhandled Exception:
>     
>     Cirrious.CrossCore.Exceptions.MvxException: Loading...
>     06-25 16:57:47.188 E/mono    (  717): 
>     06-25 16:57:47.188 E/mono    (  717): Unhandled Exception:
>     06-25 16:57:47.188 E/mono    (  717): Cirrious.CrossCore.Exceptions.MvxException: Could not load file or
> assembly 'Cirrious.MvvmCross.Plugins.File.Droid.dll' or one of its
> dependencies. The system cannot find the file specified. --->
> System.IO.FileNotFoundException: Could not load file or assembly
> 'Cirrious.MvvmCross.Plugins.File.Droid.dll' or one of its
> dependencies. The system cannot find the file specified.
>     06-25 16:57:47.188 E/mono    (  717): File name: 'Cirrious.MvvmCross.Plugins.File.Droid.dll'
>     06-25 16:57:47.188 E/mono    (  717):   at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence
> assemblySecurity, Boolean refonly) [0x00000] in <filename unknown>:0 
>     06-25 16:57:47.188 E/mono    (  717):   at System.AppDomain.Load (System.String assemblyString) [0x00000] in <filename unknown>:0 
>     06-25 16:57:47.188 E/mono    (  717):   at (wrapper remoting-invoke-with-check) System.AppDomain:Load (string)
>     06-25 16:57:47.188 E/mono    (  717):   at System.Reflection.Assembly.Load (System.String assemblyString)
> [0x00000] in <filename unknown>:0 
>     06-25 16:57:47.188 E/mono    (  717):   at (wrapper remoting-invoke-with-check) Syst06-25 16:57:47.188 E/mono    (  717): 
> at Cirrious.CrossCore.Plugins.MvxFilePluginManager.LoadAssembly
> (System.Type toLoad) [0x0001e] in
> c:\Projects\Misc\MVVMCROSS\CrossCore\Cirr
>     The program 'Mono' has exited with code 0 (0x0).
4

1 回答 1

0

这篇文章看起来像是 nuget 和非 nuget 方法的奇怪组合。错误消息表明您尚未将 File 插件添加到您的 Android 应用程序项目中 - 是吗?


除此之外,由于您已经设置并工作了 nuget,我认为如果您在 N+1 视频中遵循 N=8 和 N=9 可能会很有用——这些视频讨论了如何包含和使用插件。请参阅http://mvvmcross.wordpress.com/上的这些索引- 例如:

于 2013-06-25T19:17:19.503 回答