在 Xamarin.Forms 项目中加载缺少的程序集问题 [英] Issue loading missing assemblies in Xamarin.Forms project

查看:15
本文介绍了在 Xamarin.Forms 项目中加载缺少的程序集问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个 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.csMain 中找到对它的引用.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屋!

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