I have created simple .NET5 console application which can be successfully run using "dotnet restore" and "dotnet run". Application is using one package Newtonsoft.Json.
I want to restore NuGet packages using NuGetRestore() but in result I get "Could not locate nuget.exe". I am using Cake .NET Tool in version 1.1.0 and default configuration.
As far as I remember, previously when I was using Cake before version 1.0.0 nuget.exe was downloaded to 'tools' folder.
What am I missing? How to make sure nuget.exe is downloaded/provided by Cake?
In order for the NuGet tool to be downloaded to the tools
folder, you need to include the NuGet.CommandLine
package in your Cake build script. e.g.
#tool nuget:?package=NuGet.CommandLine&version=5.9.1
Related info: