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

Viewed 7604

For TFS build (I use TFS 2017) should I use NuGet Installer task or use the Visual Studio Build step in the build configuration to restore all NuGet packages. Which is the preferred way to use it?

3 Answers

At first, I was confused because I thought the NuGet Restore task before the build was where the error was coming from. The answer from Patrick-MSFT helped me find the correct answer but I am adding more information and context. Build Definition edit in TFS 2017

As you can see, the checkbox for the NuGet Restore is under the Build task, just like @Patrick-MSFT showed. What confused me, however, was before my Build task I had a NuGet Installer task with name NuGet restore. The unchecking the checkbox should remove the error.

Related