fix(ci): use renamed Microsoft.ArtifactSigning.Client NuGet package

Microsoft renamed Trusted Signing to Artifact Signing and delisted the
old Microsoft.Trusted.Signing.Client package, which broke the setup
step. The dlib inside kept its Azure.CodeSigning.Dlib.dll filename;
locate it by search instead of a hardcoded path so future package
reshuffles fail loudly rather than at a stale path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Ramnique Singh 2026-07-23 10:38:15 +05:30
parent 71c5034e10
commit df72bb2b29

View file

@ -252,10 +252,15 @@ jobs:
$dir = "C:\azsign" $dir = "C:\azsign"
New-Item -ItemType Directory -Force -Path $dir | Out-Null New-Item -ItemType Directory -Force -Path $dir | Out-Null
# The signtool plugin that delegates signing to Azure Trusted Signing. # The signtool plugin that delegates signing to Azure Trusted Signing
nuget install Microsoft.Trusted.Signing.Client -x -OutputDirectory "$dir\nuget" # (renamed "Artifact Signing" — the old Microsoft.Trusted.Signing.Client
$dlib = "$dir\nuget\Microsoft.Trusted.Signing.Client\bin\x64\Azure.CodeSigning.Dlib.dll" # package is gone from NuGet, but the dlib inside kept its filename).
if (-not (Test-Path $dlib)) { throw "Azure.CodeSigning.Dlib.dll not found at $dlib" } nuget install Microsoft.ArtifactSigning.Client -x -OutputDirectory "$dir\nuget"
$dlib = Get-ChildItem "$dir\nuget" -Recurse -Filter "Azure.CodeSigning.Dlib.dll" |
Where-Object { $_.FullName -match '\\x64\\' } |
Select-Object -First 1 -ExpandProperty FullName
if (-not $dlib) { throw "x64 Azure.CodeSigning.Dlib.dll not found under $dir\nuget" }
echo "Using dlib: $dlib"
# Tells the dlib which account/profile to sign with. # Tells the dlib which account/profile to sign with.
@{ @{