VS 2017 RC:我无法在Nuget中更新NETStandard.Library [英] VS 2017 RC : I Can not update NETStandard.Library in Nuget
问题描述
从最近一次(或最后两次更新)开始,我无法在Nuget中更新NETStandartLibrary软件包。
我只是创建一个新的标准库项目。看到此消息:
From the last (or maybe the two last) update, I can't update the package NETStandartLibrary in Nuget. I just create a new standard library project. See this message :
在项目属性中,版本不同:
In project's properties, the version is different :
在.csproj中:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
</PropertyGroup>
</Project>
在Nuget中,我添加了依赖项 Microsoft.EntityFrameworkCore,然后得到警告:
In Nuget, I add the dependency 'Microsoft.EntityFrameworkCore', then I got the warning :
警告检测到软件包降级:NETStandard.Library从1.6.1降到
1.6.0 AgainTest(> = 1.0.0)-> Microsoft.EntityFrameworkCore(> = 1.1.0)-> NETStandard.Library(> = 1.6.1)AgainTest(> = 1.0.0)-> NETStandard.Library(> = 1.6.0)
Warning Detected package downgrade: NETStandard.Library from 1.6.1 to 1.6.0 AgainTest (>= 1.0.0) -> Microsoft.EntityFrameworkCore (>= 1.1.0) -> NETStandard.Library (>= 1.6.1) AgainTest (>= 1.0.0) -> NETStandard.Library (>= 1.6.0)
我在项目的属性中选择了高版本,但警告仍在继续。
I select the high version in the project's property, but the warning continue.
- 所有这些版本号是什么?
- 如何解决此警告?
推荐答案
您不能从GUI更改此内容,因为此包是从TargetFramework定义的隐含性。要更改NETStandard.Library软件包的版本,请将以下内容添加到csproj文件中。
You can't change this from the GUI because this package is impliclity defined from your TargetFramework. To change the version of NETStandard.Library package, add the following to your csproj file.
<PropertyGroup>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>
这篇关于VS 2017 RC:我无法在Nuget中更新NETStandard.Library的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!