尽管应该支持包,但 Nuget 包安装失败
Nuget package installation fails although package should be supported
我正在尝试在我的 Visual Studio 2013 解决方案中安装软件包 Microsoft.Extensions.DependencyInjection.Abstractions 作为 Sitecore 安装的一部分。该解决方案具有 .NET 目标框架 4.5.2。
安装失败
Install-Package : Could not install package 'Microsoft.Extensions.DependencyInjection.Abstractions 1.0.0'. You are trying to install this package into a project that targets
'.NETFramework,Version=v4.5.2', 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 Microsoft.Extensions.DependencyInjection.Abstractions -Version 1 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
我已尝试在全新的空解决方案中执行安装,但安装仍然失败。
根据 link,存在对 .NETStandard 1.0 的依赖性,但根据 this.
,4.5 应该支持它
JaCraig 的评论帮助我解决了这个问题:我将 Nuget 包管理器从 2.8 升级到 2.12。之后安装就没有问题了
我正在尝试在我的 Visual Studio 2013 解决方案中安装软件包 Microsoft.Extensions.DependencyInjection.Abstractions 作为 Sitecore 安装的一部分。该解决方案具有 .NET 目标框架 4.5.2。
安装失败
Install-Package : Could not install package 'Microsoft.Extensions.DependencyInjection.Abstractions 1.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', 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 Microsoft.Extensions.DependencyInjection.Abstractions -Version 1 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
我已尝试在全新的空解决方案中执行安装,但安装仍然失败。
根据 link,存在对 .NETStandard 1.0 的依赖性,但根据 this.
,4.5 应该支持它JaCraig 的评论帮助我解决了这个问题:我将 Nuget 包管理器从 2.8 升级到 2.12。之后安装就没有问题了