WebSocket4Net 不能 Nuget 对 iOS 项目的依赖 [英] WebSocket4Net cannot Nuget dependency to iOS project
问题描述
我正在尝试在 Xamarin 中将 WebSocket4Net 安装到我的 iOS/Android 项目.
I am trying to install WebSocket4Net to my iOS/Android project in Xamarin.
当我将它添加到 Android 项目时,一切正常.当我尝试将它添加到 iOS 项目时,我看到了这个...
When I add it to the Android project everything works great. When I try to add it to the iOS project I see this...
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
我的项目是否太旧/太新而无法添加此内容?
Am I on too old/too new of a project to add this perhaps?
推荐答案
您当前正在处理 Unified iOS 项目,而 NuGet 包不包含此类程序集.非常类似地记录了一个问题,
You are currently working on a Unified iOS project, while the NuGet package does not contain such an assembly. Quite similarly an issue was documented,
http://blog.alectucker.com/post/2015/01/19/sqlite-error-with-xamarinios-unified-api.aspx
Kerry 已经在代码库中完成了对统一 iOS 的支持,
Kerry has the Unified iOS support done already in code base,
https://github.com/kerryjiang/WebSocket4Net
所以你要么等待更新的 NuGet 包,要么直接使用源代码.
So you either wait for an updated NuGet package, or simply use the source code directly.
这篇关于WebSocket4Net 不能 Nuget 对 iOS 项目的依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!