我正在尝试将WebSocket4Net安装到Xamarin的iOS / Android项目中。
当我将它添加到Android项目时,一切都很好。当我尝试将它添加到iOS项目时,我看到了......
Install-Package : Could not install package 'WebSocket4Net 0.12'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', 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.
At line:1 char:1
+ Install-Package WebSocket4Net
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
我是否太过老/太新的项目可能会添加这个?
答案 0 :(得分:1)
您目前正在开发Unified iOS项目,而NuGet包不包含此类程序集。很有类似的问题记录在案,
http://blog.alectucker.com/post/2015/01/19/sqlite-error-with-xamarinios-unified-api.aspx
Kerry已经在代码库中完成了统一iOS支持,
https://github.com/kerryjiang/WebSocket4Net
所以你要么等待更新的NuGet包,要么直接使用源代码。