【问题标题】:ServiceStack - 'ServiceStack.Interfaces 4.0.32' and PCLServiceStack - 'ServiceStack.Interfaces 4.0.32' 和 PCL
【发布时间】:2014-10-26 01:08:09
【问题描述】:

尝试将 ServiceStack 安装到 PCL 中,但出现以下错误:

无法安装包“ServiceStack.Interfaces 4.0.32”。您正在尝试将此包安装到以“portable-net45+win+wpa81+MonoAndroid10+MonoTouch10”为目标的项目中,但该包不包含任何与该框架兼容的程序集引用或内容文件。如需更多信息,请联系包作者。

我安装了最新的 nuget 包。

关于如何解决的任何想法?

【问题讨论】:

    标签: servicestack


    【解决方案1】:

    ServiceStack 的 Hello Mobile 项目包含有关 ServiceStack 的 PCL 支持的详细信息,其中 ServiceStack.Interfaces 是针对 Profile136 而构建的,而 ServiceStack.TextServiceStack.Client NuGet 包仅支持 Profile7,即 PCL 支持不包括 Windows Phone 或 Silverlight,尽管 NuGet 包确实包括 Silverlight 的自定义构建。

    可移植类库支持

    大多数客户端使用 ServiceStack 的新 PCL 支持,这些支持包含在以下 NuGet 包中:

    • ServiceStack.Interfaces
      • PCL 配置文件:iOS、Android、Windows8、.NET 4.0、Silverlight5、WP8 (Profile136)
    • ServiceStack.Client
      • PCL 配置文件:iOS、Android、Windows8、.NET 4.5(Profile7)
      • 自定义版本:NET40、Silverlight 5
    • ServiceStack.Text
      • PCL 配置文件:iOS、Android、Windows8、.NET 4.5(Profile7)
      • 自定义版本:NET40、Silverlight 5

    您需要确保您引用的项目与支持的 PCL 配置文件相匹配。

    【讨论】:

    • 是否有计划允许 ServiceStack.Interfaces 与 netstandard PCL 一起使用?
    • @ChrisKlepeis 是的,它正在处理中,您可以投票给.NET Core feature request 以接收有关进度的通知。
    猜你喜欢
    • 2017-02-09
    • 1970-01-01
    • 2016-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多