7

I've created a brand new solution and project in VS2017 RC and for some reason I can't use the latest version of the NETStandard.Library package.

There's no code in the project and it's the first project in the solution.

When in the NuGet package manager it's listed in the dropdown, but marked as blocked by project.

Any ideas?

Athari
  • 33,702
  • 16
  • 105
  • 146
RubbleFord
  • 7,456
  • 9
  • 50
  • 80
  • I think you need to have latest version VS2017 RC. Refer [this](https://developercommunity.visualstudio.com/content/problem/15456/net-core-class-library-doesnt-resolve-netstandardl-9.html) – Sanket Feb 18 '17 at 07:28
  • What kind of project did you create? Don't assume everyone can see your desktop. – Lex Li Feb 18 '17 at 12:50
  • 1
    Duplicate : http://stackoverflow.com/questions/42320021/vs-2017-rc-i-can-not-update-netstandard-library-in-nuget – vernou Feb 19 '17 at 11:00
  • I have the RTW and still get this nonsense when creating a new project. – StingyJack Mar 11 '17 at 16:33

2 Answers2

7

You need to execute the command in Package manager console for your project Install-Package NETStandard.Library

  • In the released version of VS 2017, the reference is no longer meant to be edited via NuGet. There is a property in the csproj that can override the version used - which is set when migrating from project.json. – Martin Ullrich May 22 '17 at 13:41
7

The NETStandard.Library package is no longer meant to be upgradable through the package management UI. The "SDK" component of the project emits this reference automatically and marked read-only.

This behaviour can be overridden through a property in the csproj file:

<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>

If you delete a line like this from your csproj file, you'll get the newest version that VS or the CLI knows about.

This property is usually added when migrating from project.json to csproj. In this case, you can safely remove it.

Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217