簡體   English   中英

如何在Xamarin Studio中添加nuget包

[英]How to add nuget package in Xamarin studio

我對Xamarin Studio完全陌生。 我正在嘗試添加一個nuget包。 使用添加軟件包對話框似乎可以正常工作,但是出現錯誤:

  Attempting to gather dependency information for package 'SidebarNavigation.1.9.0.3' with respect to project 'helloios', targeting '.NETPortable,Version=v4.0,Profile=Profile344'
Attempting to resolve dependencies for package 'SidebarNavigation.1.9.0.3' with DependencyBehavior 'Lowest'
Resolving actions to install package 'SidebarNavigation.1.9.0.3'
Resolved actions to install package 'SidebarNavigation.1.9.0.3'
For adding package 'SidebarNavigation.1.9.0.3' to project 'helloios' that targets 'portable40-net45+sl5+win8+wp8+wpa81'.
Install failed. Rolling back...
Package 'SidebarNavigation.1.9.0.3' does not exist in project 'helloios'
Package 'SidebarNavigation.1.9.0.3' does not exist in folder '/Users/********/Projects/helloios/packages'
Could not install package 'SidebarNavigation 1.9.0.3'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.0,Profile=Profile344', 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.

這是該軟件包的github頁面。

https://github.com/jdehlin/Xamarin-Sidebar

我嘗試使用其他PCL配置文件無效。 我不確定如何確定應使用哪個配置文件。

該軟件包僅針對“ Xamarin.iOS”。 您不能在目標更多的PCL中引用它,因為任何其他平台都無法使用它。

不要使用PCL,或者將PCL限制為“ Xamarin.iOS”。

由於這似乎是一個UI組件,因此您應該從主項目中引用它,並在需要時通過PCL的服務公開某些功能。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM