在 Xamarin.Forms 项目中加载缺少的程序集问题 [英] Issue loading missing assemblies in Xamarin.Forms project
问题描述
我正在构建一个 Xamarin.Forms 项目并且我在启动该项目时没有遇到任何问题,但是在尝试构建该项目时突然出现以下异常:
I'm building a Xamarin.Forms project and I had no problems starting up the project but all of a sudden when trying building the project I get the following Exception:
Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'Windows.Foundation.FoundationContract,
Version=3.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist
in the Mono for Android profile Filename: 'Windows.Foundation.FoundationContract.dll'
我已经在我的项目中查找了 Windows.Foundation
命名空间的使用位置,但我只能在 AppDelegate.cs
和 Main 中找到对它的引用.cs
的 iOS 项目.
I have looked for where in my project the Windows.Foundation
namespace is used but I can only find references to it in the AppDelegate.cs
and Main.cs
of the iOS-project.
推荐答案
显然该异常有点令人困惑,因为它与引用的另一个程序集有关.在我删除该程序集后,Windows.Foundation.FoundationUniversalContract 一切正常.当我无法理解如何添加此引用时.
Apparantly the exception was a bit confusing because it was related to another assembly that was referenced. After I deleted that assembly, Windows.Foundation.FoundationUniversalContract, all worked fine. When an how this reference was added is beyond me.
这篇关于在 Xamarin.Forms 项目中加载缺少的程序集问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!