繁体   English   中英

Xamarin.Forms在Xamarin工作室

[英]Xamarin.Forms in Xamarin Studio

我下载了Xamarin Studio来构建我的第一个应用程序,但是我遇到了一些我没有找到解决方案的问题。

首先,我使用App Xamarin.Forms Blank模板创建了一个新的解决方案。 当我尝试构建它时,出现了一些错误(我没有从模板中更改一行):


The type or namespace name 'Xamarin' could not be found (are you mission a using directive or an assembly reference?)
The type or namespace name 'Application' could not be found (are you mission a using directive or an assembly reference?)

然后我认为Xamarin.Forms包丢失了,所以我点击了Project> Add NuGet Packages ...我尝试安装Xamarin.Forms包。 这是我卡住的地方,因为显示了一个新错误:


Could not install package 'Xamarin.Forms 1.3.3.6323'. You are trying to install this package into a project that targets 'portable-Profile78', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

我会感激任何帮助,因为我没有找到任何解决方案。

错误消息表明您没有安装可移植类库(PCL)。

如果您使用的是Mac,则可以通过安装Mono Development Kit(MDK)来安装这些软件。

如果你在Windows上,程序有点棘手。 要在Windows上安装可移植类库,您有三个选择:

  1. 安装Visual Studio 2013(完整版或Express版)。 需要更新2或更高版本。
  2. 安装可移植库工具可移植库参考程序集4.6
  3. 安装可移植库工具并将.NETPortable目录从Mono复制到Windows。

2.的一个问题是安装可移植库参考组件4.6不会将它们安装到正确的位置,而只是将PortableReferenceAssemblies.zip文件安装到目录中:

C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6

此PortableReferenceAssemblies.zip文件包含三个目录(4.0,4.5和4.6),需要将其解压缩并复制到PCLs目录中:

 C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable

有关Xamarin Studio安装可移植类库的详细信息,但上面的内容应该概述了所需的内容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM