Nuget软件包还原问题-VS 2017

时间:2019-01-03 16:20:43

标签: .net-core nuget-package-restore

我正在尝试使用以下命令重新安装一组nuget软件包

Update-Package Microsoft.Extensions.Logging.Debug -ProjectName Client.XXX.API -reinstall

我遇到了一个问题,因为该命令导致尝试升级到与基础.net核心版本不兼容的软件包的最新版本。这是整个错误

获取https://api.nuget.org/v3-flatcontainer/microsoft.extensions.logging.debug/index.json   OK https://api.nuget.org/v3-flatcontainer/microsoft.extensions.logging.debug/index.json 187ms   获取https://api.nuget.org/v3-flatcontainer/microsoft.extensions.logging.debug/2.2.0/microsoft.extensions.logging.debug.2.2.0.nupkg   OK https://api.nuget.org/v3-flatcontainer/microsoft.extensions.logging.debug/2.2.0/microsoft.extensions.logging.debug.2.2.0.nupkg 28ms   获取https://api.nuget.org/v3-flatcontainer/system.net.http/index.json   获取https://api.nuget.org/v3-flatcontainer/system.text.regularexpressions/index.json   OK https://api.nuget.org/v3-flatcontainer/system.net.http/index.json 131ms   OK https://api.nuget.org/v3-flatcontainer/system.text.regularexpressions/index.json 214毫秒 安装Microsoft.Extensions.Logging.Debug 2.2.0。 Microsoft.IdentityModel.Clients.ActiveDirectory 3.13.5取决于System.Net.Http(> = 4.0.1),但未找到System.Net.Http 4.0.1。解决了System.Net.Http 4.1.0的最佳匹配问题。 Microsoft.IdentityModel.Clients.ActiveDirectory 3.13.5取决于System.Text.RegularExpressions(> = 4.0.12),但找不到System.Text.RegularExpressions 4.0.12。解决了System.Text.RegularExpressions 4.1.0的近似最佳匹配。 Update-Package:软件包Microsoft.Extensions.Logging.Debug 2.2.0与netcoreapp1.1(.NETCoreApp,Version = v1.1)不兼容。软件包Microsoft.Extensions.Logging.Debug 2.2.0支持:netstandard2.0 (.NETStandard,Version = v2.0)

我的问题是-如何强制将软件包还原到特定版本。 Microsoft文档here提到指定“ -reinstall”开关以确保版本受限制。

0 个答案:

没有答案