|
1 | 1 | #l "buildserver.cake" |
2 | 2 |
|
3 | 3 | #tool "nuget:?package=GitVersion.CommandLine&version=5.12.0" |
| 4 | +#tool "nuget:?package=NuGet.CommandLine&version=7.0.0" |
4 | 5 |
|
5 | 6 | //------------------------------------------------------------- |
6 | 7 |
|
@@ -252,6 +253,8 @@ public class NuGetContext : BuildContextBase |
252 | 253 |
|
253 | 254 | protected override void LogStateInfoForContext() |
254 | 255 | { |
| 256 | + CakeContext.Information($"NuGet executable path '{Executable}'"); |
| 257 | + CakeContext.Information($"NuGet executable version '{FileVersionInfo.GetVersionInfo(Executable).FileVersion}'"); |
255 | 258 | CakeContext.Information($"Restore using NuGet: '{RestoreUsingNuGet}'"); |
256 | 259 | CakeContext.Information($"Restore using dotnet restore: '{RestoreUsingDotNetRestore}'"); |
257 | 260 | } |
@@ -511,7 +514,8 @@ private GeneralContext InitializeGeneralContext(BuildContext buildContext, IBuil |
511 | 514 | data.NuGet = new NuGetContext(data) |
512 | 515 | { |
513 | 516 | PackageSources = buildContext.BuildServer.GetVariable("NuGetPackageSources", showValue: true), |
514 | | - Executable = "./tools/nuget.exe", |
| 517 | + // Executable = "./tools/nuget.exe", |
| 518 | + Executable = buildContext.CakeContext.Tools.Resolve("nuget.exe").FullPath, |
515 | 519 | LocalPackagesDirectory = "c:\\source\\_packages", |
516 | 520 | RestoreUsingNuGet = buildContext.BuildServer.GetVariableAsBool("NuGet_RestoreUsingNuGet", false, showValue: true), |
517 | 521 | RestoreUsingDotNetRestore = buildContext.BuildServer.GetVariableAsBool("NuGet_RestoreUsingDotNetRestore", true, showValue: true), |
|
0 commit comments