Skip to content

Commit 4224a41

Browse files
peponeclaude
andauthored
Fix sn.exe not found in PATH during strong name signing (#4923)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2df9e8f commit 4224a41

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/build-dotnet-packages.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ jobs:
126126
# Set environment variables for the build
127127
echo "PUBLIC_KEYFILE=${{ github.workspace }}\csharp\msbuild\ice-release-pub-key.snk" >> $env:GITHUB_ENV
128128
echo "KEYFILE=${{ github.workspace }}\csharp\msbuild\ice-release-key.snk" >> $env:GITHUB_ENV
129+
130+
# Add the .NET Framework SDK tools directory to PATH for sn.exe (strong name tool)
131+
$sdkToolsPath = "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools"
132+
if (Test-Path $sdkToolsPath) {
133+
Write-Host "Adding $sdkToolsPath to PATH"
134+
echo $sdkToolsPath >> $env:GITHUB_PATH
135+
} else {
136+
Write-Host "Warning: .NET Framework SDK tools path not found at $sdkToolsPath"
137+
}
129138
} else {
130139
Write-Host "Strong name signing keys not configured - assemblies will not be signed"
131140
}
@@ -172,5 +181,5 @@ jobs:
172181
with:
173182
name: dotnet-nuget-packages
174183
path: |
175-
csharp/msbuild/zeroc.ice.net/*.nupkg
176-
csharp/msbuild/zeroc.ice.net/*.snupkg
184+
csharp/msbuild/*.nupkg
185+
csharp/msbuild/*.snupkg

0 commit comments

Comments
 (0)