System.IO.FileNotFoundException:无法加载程序集...可能在 Mono for Android Profile 中不存在? [英] System.IO.FileNotFoundException: Could not load assembly...perhaps doesn't exist in the Mono for Android Profile?

查看:15
本文介绍了System.IO.FileNotFoundException:无法加载程序集...可能在 Mono for Android Profile 中不存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试从 Visual Studio 编译我的 Android 应用程序时出现以下错误(我使用的是 Xamarin 插件).

I am getting the following error when trying to compile my Android App from Visual Studio (I am using Xamarin plug in).

加载程序集时出现错误 2 异常:System.IO.FileNotFoundException:无法加载程序集PresentationUI,版本=4.0.0.0,文化=中性,PublicKeyToken=31bf3856ad364e35".也许它不存在于 Mono for Android 配置文件中?

Error 2 Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Perhaps it doesn't exist in the Mono for Android profile?

文件名:'PresentationUI.dll' atXamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference

File name: 'PresentationUI.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference

reference, ReaderParameters 参数)在Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1

reference, ReaderParameters parameters) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1

程序集、AssemblyDefinition 程序集、布尔顶级)在Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1

assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1

程序集、AssemblyDefinition 程序集、布尔顶级)在Xamarin.Android.Tasks.ResolveAssemblies.Execute()

assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.Execute()

我环顾四周,发现了这个 论坛帖子 看起来像一个类似的问题.我找不到 PresentationUI.dll 程序集.

I had a look around and found this forum post which looks like a similar problem. I couldn't find the PresentationUI.dll assembly tho.

关于为什么我会收到此错误以及如何修复它的任何建议?

Any suggestion on why am I getting this error and how to fix it?

更新

我发现问题实际上来自使用 Microsoft.Practices.Prism.dll 中的 DelegateCommand是不是因为 Xamarin 不支持这个程序集?

I found that the problem actually comes from using DelegateCommand from Microsoft.Practices.Prism.dll Is it because this assembly is not supported by Xamarin?

干杯,

推荐答案

PresentationUI 是 WPF(Windows 上的 UI 框架)的一部分,在 Xamarin.Android 等移动平台上不可用.

PresentationUI is part of WPF (UI framework on Windows), which is not available on mobile platforms, such as Xamarin.Android.

您必须重新创建应用程序的移动兼容 UI,以便为 Android 做好准备.

You have to recreate a mobile compatible UI of your application so as to be Android ready.

Microsoft 将 Prism 设计为与 WPF 一起使用,因此是的,您不能在 Xamarin.Android 项目中使用它.(不过,Prism 最新版本确实适用于 Xamarin Forms).

Microsoft designs Prism to work with WPF, so yes you cannot use it in a Xamarin.Android project. (Prism latest build does work with Xamarin Forms though).

参考:.NET 跨平台 UI框架

这篇关于System.IO.FileNotFoundException:无法加载程序集...可能在 Mono for Android Profile 中不存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆