0

我正在尝试将 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

我是不是在一个项目太旧/太新而无法添加这个?

4

1 回答 1

1

你目前正在处理一个统一的 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 包,要么直接使用源代码。

于 2015-06-13T08:20:02.443 回答