【问题标题】:Error when installing NetMQ via nuget to xamarin projects通过 nuget 将 NetMQ 安装到 xamarin 项目时出错
【发布时间】:2016-05-10 15:11:19
【问题描述】:

我尝试将 NetMQ 安装到我的 xamarin 应用程序。

由于 NetMQ 依赖于 AsyncIO,无法安装此包并显示以下错误:

Could not install package 'AsyncIO 0.1.18'. You are trying to install this 
package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111',
 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.

我该如何重新解决这个问题?

【问题讨论】:

    标签: c# visual-studio xamarin nuget netmq


    【解决方案1】:

    AsyncIO 0.1.18 NuGet 包和 NetMQ 3.3.3.1 NuGet 包仅包含适用于 .NET 4.0 和 .NET 3.5 的程序集,因此您无法将其安装到可移植类库项目或 Xamarin 项目中。

    您的选择包括:

    1. 将这些库移植到 Xamarin 框架。
    2. 仅在服务器端使用这些库。然后,您的 Xamarin 项目使用受支持的方式连接到您的服务器,例如通过 http 发送 json 消息。
    3. 查找另一个支持 Xamarin 框架的库。

    【讨论】:

    • 谢谢,非常明确的答案,+1。你知道如何将这些库移植到 Xamarin 框架。
    • 好问题。首先,您可以尝试针对您正在使用的 Xamarin 框架编译它们。
    • 我在一个问题中提出了这一点,以便更清楚。非常欢迎你来看看:stackoverflow.com/questions/37143070/using-zeromq-in-xamarin
    【解决方案2】:

    NetMQ 现在面向 Xamarin IOS 和 Android,您可以在此处下载:

    https://www.nuget.org/packages/NetMQ/4.0.0.3-rc3

    【讨论】:

    • 谢谢,+1 正在您的程序中定位窗口。
    • 你是说windows phone?可能不是因为 System.Net.Socket 在 Windows 手机上不可用
    • 不,我的意思是 Windows UWP(通用 Windows 平台)
    猜你喜欢
    • 1970-01-01
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多