【发布时间】:2018-01-02 16:49:17
【问题描述】:
我正在使用 Visual Studio 2010 高级版(我的项目无法使用更高版本)。
我从工具 --> 扩展管理器 --> 在线库安装了适用于 Visual Studio 的 NuGet 包管理器。
我安装了 iText7 的依赖项“Common.Logging”和“Common.Logging.Core”包。
我尝试在前两个包之后安装 iText7,但出现错误,因为“Portable.BouncyCastle”包也是 iText7 的依赖项。
我尝试安装“Portable.BouncyCastle”包但出现错误:
安装包:“Portable.BouncyCastle 1.8.1.3”包需要 NuGet 客户端版本“2.12”或更高版本,但当前 NuGet 版本为“2.8.60318.667”。
PM> Install-Package itext7
Attempting to resolve dependency 'Common.Logging (≥ 3.4.1)'.
Attempting to resolve dependency 'Common.Logging.Core (≥ 3.4.1)'.
Attempting to resolve dependency 'Portable.BouncyCastle (≥ 1.8.1.3)'.
Install-Package : 'Portable.BouncyCastle' already has a dependency defined for 'NETStandard.Library'.
At line:1 char:1
+ Install-Package itext7
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM> Install-Package Common.Logging
Attempting to resolve dependency 'Common.Logging.Core (≥ 3.4.1)'.
Installing 'Common.Logging.Core 3.4.1'.
Successfully installed 'Common.Logging.Core 3.4.1'.
Installing 'Common.Logging 3.4.1'.
Successfully installed 'Common.Logging 3.4.1'.
Adding 'Common.Logging.Core 3.4.1' to AF.Custom.Events.
Successfully added 'Common.Logging.Core 3.4.1' to AF.Custom.Events.
Adding 'Common.Logging 3.4.1' to AF.Custom.Events.
Successfully added 'Common.Logging 3.4.1' to AF.Custom.Events.
PM> Install-Package Common.Logging.Core
'Common.Logging.Core 3.4.1' already installed.
AF.Custom.Events already has a reference to 'Common.Logging.Core 3.4.1'.
PM> Install-Package itext7
Attempting to resolve dependency 'Common.Logging (≥ 3.4.1)'.
Attempting to resolve dependency 'Common.Logging.Core (≥ 3.4.1)'.
Attempting to resolve dependency 'Portable.BouncyCastle (≥ 1.8.1.3)'.
Install-Package : 'Portable.BouncyCastle' already has a dependency defined for 'NETStandard.Library'.
At line:1 char:1
+ Install-Package itext7
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM> Install-Package Portable.BouncyCastle
Install-Package : The 'Portable.BouncyCastle 1.8.1.3' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'.
At line:1 char:1
+ Install-Package Portable.BouncyCastle
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], NuGetVersionNotSatisfiedException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM>
我在 Visual Studio 中从工具 --> 扩展管理器 --> 更新检查了 NuGet 客户端的更新。 ,但找不到任何更新。
有什么想法吗?
【问题讨论】:
-
听起来您的问题是您试图在 8 年前的 IDE 中安装当前版本的软件包。也许使用旧版本? 7.0.3 appears to have no dependencies
-
感谢 stuartd,我安装了 7.0.3 版本,完全没有问题!
标签: c# visual-studio-2010 nuget itext7