Home: NuGet /t:restore still does not work on Visual Studio Build Tools 15.4.1

Created on 25 Oct 2017  路  1Comment  路  Source: NuGet/Home

As suggested on PR https://github.com/NuGet/NuGet.Client/pull/1626#issuecomment-339055716 and commented in this issue https://github.com/Microsoft/msbuild/issues/1697 it looks like MSBuild still does not work with NuGet restore builtin with Build Tools...

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework coming from Visual Studio Build Tools

image

OS version (i.e. win10 v1607 (14393.321)):
Windows 10 Fall Creators Update

Detailed repro steps so we can see the same problem

When I issue msbuild within my directory with the sln:

`` &'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MS
Build.exe' /t:restore
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
````

I get the following error:
error MSB4057: The target "restore" does not exist in the project.

So it seems the /t:restore still does not work even though the nuget artifacts were included in latest version

Most helpful comment

You need to install the target in the Workloads, which by now is not installed by default...
image

>All comments

You need to install the target in the Workloads, which by now is not installed by default...
image

Was this page helpful?
0 / 5 - 0 ratings