Skip to content

Commit

Permalink
Fix nuke-build#1186 Fixing signtool.exe path for new windows kits
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Calheiros committed May 31, 2023
1 parent 72e0bad commit a35fe9c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/Nuke.Common/Tools/SignTool/SignToolSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE

using System;
using System.Linq;
using JetBrains.Annotations;
using Nuke.Common.IO;
Expand All @@ -20,8 +19,14 @@ private static string GetToolPath()
: SpecialFolders.ProgramFiles).NotNull();

var platformIdentifier = EnvironmentInfo.Is64Bit ? "x64" : "x86";
const string windowsKitLastVersion = "10";

return new[]
var windowsKitsRootDirectory = programDirectory / "Windows Kits" / windowsKitLastVersion / "bin";
var signToolPath = windowsKitsRootDirectory.GlobFiles($"{windowsKitLastVersion}.*/{platformIdentifier}/signtool.exe").LastOrDefault();

return signToolPath ??

new[]
{
programDirectory / "Windows Kits" / "10" / "bin" / "10.0.15063.0",
programDirectory / "Windows Kits" / "10" / "App Certification Kit",
Expand Down

0 comments on commit a35fe9c

Please sign in to comment.