Home: TODO: unknown keyword platform when executing nuget restore

Created on 15 Jul 2016  路  6Comments  路  Source: NuGet/Home

When I execute nuget restore on a solution with a .net core Web Application project, I get the following output:

PS C:\temp\Projects\WebApplication1> nuget restore .\WebApplication1.sln
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
TODO: unknown keyword platform

I have installed:

  • Visual Studio Update 3
  • .NET Core 1.0.0 - SDK Preview 2 (x64)
  • .NET Core 1.0.0 - VS 2015 Tooling Preview 2

The solution is created from Visual Studio Update 3 through the project template for ASP.NET MVC (.Net Core).

This is on a machine that I set up 2 days ago. It's a clean install with only the latest versions. So there are no old versions of anything lying around.
Therefore, I guess that something is missing that was installed in an earlier version or a SDK (or whatever) that is missing on this machine.

MSBuild location stated in output is correct.

nuget restore on .NET Framework 4.6.1 works correctly.

Any hints?

Thanks in advance.

Restore NotRepro

All 6 comments

@ursenzler You need nuget.exe 3.5.0-beta2 from here: https://dist.nuget.org/win-x86-commandline/v3.5.0-beta2/NuGet.exe

The error you are seeing can come from older versions of NuGet.exe that do not support .NET Core projects. The installed components you list do not include nuget.exe, so I'm not sure what version you have currently.

Assuming this is fixed if you use a new enough NuGet.exe as @emgarten suggests, closing. Please confirm that works...and let us know.

I can confirm, that version 3.5.0-beta2 fixes the issue. I was using the latest stable version 3.4.4

any plans to actually release this fix?

@Spongman it has been fixed in 3.5.0.

nuget.exe update -self still installs v3.4.4

Was this page helpful?
0 / 5 - 0 ratings