繁体   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