Xamarin.Forms - 找不到“基金会" [英] Xamarin.Forms - 'Foundation' could not be found
问题描述
我在 Microsoft Visual Studio Enterprise 2015 版本 14.0.25123.00 更新 2 中创建了一个新的空白 Xaml 应用程序(Xamarin.Forms 共享)"应用程序.
I've created a new 'Blank Xaml App (Xamarin.Forms Shared)' app in Microsoft Visual Studio Enterprise 2015 version 14.0.25123.00 Update 2.
在创建项目后,我立即收到了 217 个错误.重新启动 Visual Studio 删除了大部分,但仍有 35 个.
Immediately after creating the project, I was greeted with 217 errors. Restarting Visual Studio removed most of those, but 35 still remain.
前两个错误是关于 Foundation
和 UIKit
未找到.我相信这两个也可能导致其余的错误.
The first two errors are about Foundation
and UIKit
not being found. I believe these two might also cause the rest of the errors.
有没有人对如何解决这些问题有一些想法?
Does anyone have some ideas as to how to solve these?
Error CS0246 The type or namespace name 'Foundation' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'UIKit' could not be found (are you missing a using directive or an assembly reference?)
推荐答案
如果您缺少对 Xamarin.iOS
的引用,请尝试手动重新添加:
If you are missing the reference to Xamarin.iOS
, try re-adding it manually:
在 Xamarin.iOS 项目下,右键单击 References >添加引用...
Under the Xamarin.iOS project, right click References > Add Reference...
在参考对话框的左侧,点击Assemblies
,然后点击Framework
.搜索 Xamarin.iOS
并选择它以添加引用.
In the references dialog, on the left hand side, click on Assemblies
, then Framework
. Search for Xamarin.iOS
and select it to add the reference.
如果 Xamarin.iOS
程序集未列出,请查看以下路径:
If the Xamarin.iOS
assembly isn't listed, take a look under this path:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0
如果该目录中缺少程序集,请尝试修复 Xamarin 安装 - Windows <代码>程序和功能 >Xamarin >修复.
If the assembly is missing from that directory, try repairing the Xamarin installation - Windows Programs and Features > Xamarin > Repair
.
这篇关于Xamarin.Forms - 找不到“基金会"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!