【问题标题】:Xamarin build error Exception while loading assemblies: System.IO.FileNotFoundException加载程序集时 Xamarin 生成错误异常:System.IO.FileNotFoundException
【发布时间】:2013-07-09 19:59:32
【问题描述】:

我总是尝试构建我的 Xamarin 应用程序,但出现此错误。我不知道为什么。 我使用 .Net Framework 4 的 System.Security.dll,尽管这应该可以。 谢谢。

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

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

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

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

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

bei Xamarin.Android.Tasks.ResolveAssemblies.Execute() (任务管理器2)

【问题讨论】:

  • 我自己收到了这个错误,你有没有设法修复它?谢谢

标签: exception build xamarin filenotfoundexception


【解决方案1】:

将缺少的.dll 添加到您的项目中。

Right click on the References folder -> Add Reference -> Browse -> C:\Windows\Microsoft.NET\Framework64\<version number>\ -> <missing.dll>

Clean 你的项目和rebuild

【讨论】:

  • 嘿!该解决方案有效,但给出了另一个错误说明:The "LinkAssemblies" task failed unexpectedly...。你能帮我解决这个问题吗?
【解决方案2】:

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

更新

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

【讨论】:

  • 什么是 GAC?澄清这一点以使此答案更有用会很有用。
  • GAC 在这里可能是错误的词。这些是默认的 .net (mono) 框架库。您可以在 Project/References/ 中找到它们,然后右键单击“Edit References”,您会在 Packages 选项卡下找到框架库。
  • 我自己收到此错误,似乎无法修复,还有其他想法/提示吗?
  • 有关 GAC 的更多信息将非常有帮助。为 System.Web 添加 Xamarin dll 后,我仍然遇到问题。在我将 AWS 资源添加到工作中的 Xamarin 项目后,问题就出现了。
  • 我发现这对我有用:stackoverflow.com/questions/17557097/…
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-12-28
  • 1970-01-01
  • 2011-08-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多