What's the difference with the NuGet Installer task and "Rebuild Nuget Packages" in the Visual Studio Build step?

To build TFS (I'm using TFS 2017), either use the NuGet Installer task or use the Visual Studio Build step in the build configuration to restore all NuGet packages. What is the preferred way to use it?

+3


source to share


3 answers


You still need to use the NuGet Installer task during the build pipeline.

enter image description here

This option has been deprecated . To restore NuGet packages, add a NuGet Installer Step before building.



You can also find the corresponding prompt in Visual Studio Build .

Rebuild NuGet packages

(Important) This parameter is deprecated. Make sure to clear this checkbox and use the build step of the NuGet installer instead.

+2


source


Firstly, I was confused because I thought the NuGet Restore task before build was getting an error. The answer from Patrick-MSFT helped me find the right answer, but I am adding more information and context. Editing Build Definition in TFS 2017



As you can see, the checkbox for NuGet Restore is under the Build task, as shown in the @ Patrick-MSFT picture. However I confused me before the build job, I had a NuGet installer task with NuGet restore named. If you clear the check box, clear the error.

+2


source


The nuget command has changed the way nuget packages are restored. Previously, you had to enable recovery from your sln, which modified your csproj; this is what the legacy "nuget package restore" does. You are now using the nuget task / step before creating the sln.

See: http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html

0


source







All Articles