繁体   English   中英

Visual Studio中的Xamarin无法从Nuget添加xamarin.forms

[英]Xamarin in Visual Studio cannot add xamarin.forms from Nuget

我从github下载了xamarin.form项目。 但是,当我构建项目时,它缺少xamarin.forms包。

我尝试用Nuget添加它,但出现此错误:

Installing 'Xamarin.Forms 1.3.3.6323'.
Successfully installed 'Xamarin.Forms 1.3.3.6323'.
Adding 'Xamarin.Forms 1.3.3.6323' to DialogPro.
Uninstalling 'Xamarin.Forms 1.3.3.6323'.
Successfully uninstalled 'Xamarin.Forms 1.3.3.6323'.
Install failed. Rolling back...
Could not install package 'Xamarin.Forms 1.3.3.6323'. You are trying to install this package into a project that targets 'portable-    net45+sl50+MonoAndroid10+xamarinios10+MonoTouch10', 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.##

如何解决? 请帮我! 谢谢。

您似乎定位了错误的个人资料。 您没有Windows Phone,但确实有Silverlight。 你需要银光吗? 我知道它绝对适用于Profile 78或259。调整目标,然后尝试再次添加nuget包。 不幸的是,这意味着自目标更改以来,您可能应该重新添加该程序包的所有nuget。

编辑 :这是一些有关xamarin支持的配置文件的好文章: http ://danrigby.com/2014/04/16/xamarin-pcl-profile-notes/。 我忘了包括银光。 如果您在Xamarin Studio中打开项目,它实际上会告诉您配置文件编号。 在文本编辑器中打开csproj,然后查看配置文件编号是否在顶部。

听起来您正在将Xamarin.Forms添加到未针对任何必需框架的项目中。

您只需要将Xamarin表单包添加到android,iOS,WinPhone和PCL项目。

暂无
暂无

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

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