【问题标题】:Unable to find version 'x.x.x' of package 'PushSharp'找不到包“PushSharp”的版本“x.x.x”
【发布时间】:2016-04-28 13:02:51
【问题描述】:

执行命令时:

PM> Install-Package PushSharp -Version 2.2.1

我收到此错误:

安装包:找不到包“PushSharp”的版本“2.2.1”。 在行:1 字符:1 + 安装包 PushSharp -版本 2.2.1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

我的环境是 Visual Studio 2013 Update 5。

注意:我需要 2.2.1 版,因为我的项目很旧,并且新的 PushSharp 4.x 版中缺少某些库(这是我当前安装的 PushSharp 库) 喜欢PushBroker

Dim push As PushBroker = New PushBroker() //This is giving error

类型“PushBroker”未定义。

添加所有引用。这是我的导入。

Imports PushSharp
Imports PushSharp.Google
Imports PushSharp.Apple
Imports Newtonsoft
Imports PushSharp.Core

谢谢

【问题讨论】:

  • 我可以在 VS 2015 中安装它——你可能需要更高的 .NET 版本吗?

标签: .net visual-studio nuget nuget-package pushsharp


【解决方案1】:

我可以在 VS 2015 中安装它 - 可能是您需要更高的 .NET 版本吗?
否则,请先尝试使用空解决方案,然后将您的解决方案 packages.config 与空 packages.config 进行比较。也许有一些冲突。

【讨论】:

  • 我尝试在 VS2015 上安装,但它给了我不同的错误:PushSharp 2.2.1 is not compatible with UAP,Version=v10.0。顺便问一下我在哪里可以找到packages.config 文件?
  • 我使用了一个简单的控制台应用程序进行测试。
  • 我的是 WebAPI 项目
【解决方案2】:

在 Push Sharp 版本 4.x 中,您将 PushBroker 用作 ApnsBroker。 请冷藏以下链接: https://libraries.io/nuget/PushSharp/4.0.10

【讨论】:

    猜你喜欢
    • 2021-11-26
    • 1970-01-01
    • 2023-02-03
    • 2016-12-08
    • 1970-01-01
    • 2020-08-19
    • 2014-01-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多