在Xamarin.Forms项目中加载缺少程序集的问题

问题描述 投票:1回答:1

我正在构建一个Xamarin.Forms项目,我在启动项目时没有任何问题但是在尝试构建项目时突然间我得到以下异常:

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命名空间的位置,但我只能在iOS项目的AppDelegate.csMain.cs中找到对它的引用。

c# android xamarin.ios
1个回答
1
投票

显然这个例外有点令人困惑,因为它与另一个被引用的程序集有关。删除该程序集后,Windows.Foundation.FoundationUniversalContract,一切正常。何时添加此引用是超出我的。

© www.soinside.com 2019 - 2024. All rights reserved.