Skip to content

Update paths for cross-platform tool restore layout#993

Open
EuanKerr wants to merge 1 commit intodotnet:mainfrom
EuanKerr:main
Open

Update paths for cross-platform tool restore layout#993
EuanKerr wants to merge 1 commit intodotnet:mainfrom
EuanKerr:main

Conversation

@EuanKerr
Copy link

@EuanKerr EuanKerr commented Mar 4, 2026

Summary

Fixes #984 (and #978).

.NET 10 SDK changed dotnet pack to respect singular RuntimeIdentifier for tool projects, placing files under tools/net8.0/win-x64/ instead of tools/net8.0/any/. This broke cross-platform tool restore. While Sign CLI only supports Windows at runtime, the win-x64 package layout causes failures in several common scenarios:

  • dotnet tool restore with tool manifests (.config/dotnet-tools.json): fails on non-Windows CI runners with Settings file 'DotnetToolSettings.xml' was not found in the package. Tool manifests don't support platform conditions, so there is no way to conditionally skip restore (reported by @martincostello).
  • Cake build scripts: breaks #tool preprocessor directives that install sign, requiring workarounds like guarding installation with platform checks in separate script files (reported by @devlead).
  • Cross-platform CI pipelines: projects that pin sign in their tool manifest for version management on any platform but only execute it on Windows are blocked entirely.

Previous fix attempts:

This PR addresses the root cause by clearing RuntimeIdentifier in Sign.Cli.csproj so dotnet pack produces the tools/net8.0/any/ layout. SDK file PackagePaths are hardcoded to any to match. This restores the package layout used by all releases prior to v0.9.1-beta.26080.1 and fixes both issues.

Changes

  • Sign.Cli.csproj: Add <RuntimeIdentifier /> to clear the inherited win-x64 value
  • SdkTools.props: Hardcode any in PackagePath (replaces $(RuntimeIdentifier) which would now be empty)
  • VerifyNuGetPackage.ps1: Update expected nupkg paths from win-x64 to any
  • .vsts-ci.yml: Update BinSkim path (publish output moves from net8.0\win-x64\publish\ to net8.0\publish\)
  • Directory.Build.props: Remove ineffective CreateRidSpecificToolPackages=false

Verification

Confirmed the resulting nupkg layout matches the last known-good release (v0.9.1-beta.25278.1):

tools/net8.0/any/sign.dll
tools/net8.0/any/tools/SDK/x64/appxsip.dll
tools/net8.0/any/tools/SDK/x64/appxpackaging.dll
tools/net8.0/any/tools/SDK/x64/wintrust.dll
...
tools/net8.0/any/tools/SDK/x86/mage.exe
Release Layout Status
v0.9.1-beta.25278.1 (May 2025) tools/net8.0/any/ Last known-good
v0.9.1-beta.26080.1 (Jan 2026) sign.dll under win-x64/, SDK under any/ Broken (#978)
v0.9.1-beta.26102.1 (Feb 2026) tools/net8.0/win-x64/ Broken (#984)
This PR tools/net8.0/any/ Matches last known-good

@EuanKerr EuanKerr requested a review from a team as a code owner March 4, 2026 21:18
@EuanKerr
Copy link
Author

EuanKerr commented Mar 4, 2026

@dotnet-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SignTool 0.9.1-beta.26102.1 is broken

1 participant