加载程序集时 Xamarin 生成错误异常:System.IO.FileNotFoundException [英] Xamarin build error Exception while loading assemblies: System.IO.FileNotFoundException

查看:39
本文介绍了加载程序集时 Xamarin 生成错误异常:System.IO.FileNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是尝试构建我的 Xamarin 应用程序,但我收到此错误.我不知道为什么.我使用 .Net Framework 4 的 System.Security.dll,虽然这应该可以工作.谢谢.

always i try to Build my Xamarin app i get this error. And i dont know why. I use the System.Security.dll of .Net Framework 4 and i though this should work. Thanks.

C:程序文件(x86)MSBuildXamarinAndroidXamarin.Android.Common.targets(2,2):错误:加载程序集时出现异常:System.IO.FileNotFoundException:无法加载程序集'System.Security,版本=4.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a'.也许它不存在于 Mono用于 Android 配置文件?

C:Program Files (x86)MSBuildXamarinAndroidXamarin.Android.Common.targets(2,2): Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?

日期名称:'System.Security.dll'

Dateiname: 'System.Security.dll'

贝Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference参考,ReaderParameters 参数)

bei Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)

贝Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1程序集,AssemblyDefinition 程序集)

bei Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1 assemblies, AssemblyDefinition assembly)

贝Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1程序集,AssemblyDefinition 程序集)

bei Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1 assemblies, AssemblyDefinition assembly)

北 Xamarin.Android.Tasks.ResolveAssemblies.Execute()(TaskManager2)

bei Xamarin.Android.Tasks.ResolveAssemblies.Execute() (TaskManager2)

推荐答案

我在使用 System.Web 时遇到了同样的问题.我所要做的就是添加来自 GAC 的 System.Web 引用.

I had the same issue with System.Web. All I had to do was to add the System.Web reference from the GAC.

更新

GAC 在这里可能是错误的词.这些是默认的 .net(单声道)框架库.您可以在 Project/References/中找到它们,然后右键单击Edit References",您会在 Packages 选项卡下找到框架库.

GAC is probably the wrong word here. Those are the default .net (mono) framework libraries. You can find them in Project/References/ and right click to 'Edit References' you'd find the framework libraries under Packages tab.

这篇关于加载程序集时 Xamarin 生成错误异常:System.IO.FileNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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