簡體   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