Skip to content

"SignToolTasks.SignToolPath" can't find the correct path for signtool.exe #1186

@gustavocalheiros

Description

@gustavocalheiros

Usage Information

Nuke.Common 7.0.2 / Microsoft.NET 4.8.1 / Windows 10

Description

When trying to run "SignToolTasks.SignTool()", I have the following error:

System.ArgumentException: Expected condition to be true (Parameter 'toolPath != null')
at Nuke.Common.Assert.True(Boolean condition, String message, String argumentExpression) in /_/source/Nuke.Common/Assert.cs:line 34

"SignToolTasks.SignToolPath" looks for an old array of paths that don't correspond anymore with the latest windows kits released.
(current code: https://github.com/nuke-build/nuke/blob/develop/source/Nuke.Common/Tools/SignTool/SignToolSettings.cs)

For instance, I have "signtool.exe" installed on the path: "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe" (and the env variable "SIGNTOOL_EXE" not set)

Reproduction Steps

Install any Windows Kit 10.*

Expected Behavior

signtool should work without problems

Actual Behavior

An exception is thrown

Regression?

No response

Known Workarounds

Set manually the env variable "SIGNTOOL_EXE" with the correct path.

Could you help with a pull-request?

Yes

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions