VS 2017 RC:我无法在 Nuget 中更新 NETStandard.Library [英] VS 2017 RC : I Can not update NETStandard.Library in Nuget

查看:30
本文介绍了VS 2017 RC:我无法在 Nuget 中更新 NETStandard.Library的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从上次(或者可能是最后两次)更新开始,我无法在 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 中:

And in the .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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆