Update paths for cross-platform tool restore layout#993
Open
EuanKerr wants to merge 1 commit intodotnet:mainfrom
Open
Update paths for cross-platform tool restore layout#993EuanKerr wants to merge 1 commit intodotnet:mainfrom
EuanKerr wants to merge 1 commit intodotnet:mainfrom
Conversation
Author
|
@dotnet-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #984 (and #978).
.NET 10 SDK changed
dotnet packto respect singularRuntimeIdentifierfor tool projects, placing files undertools/net8.0/win-x64/instead oftools/net8.0/any/. This broke cross-platform tool restore. While Sign CLI only supports Windows at runtime, thewin-x64package layout causes failures in several common scenarios:dotnet tool restorewith tool manifests (.config/dotnet-tools.json): fails on non-Windows CI runners withSettings 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).#toolpreprocessor directives that install sign, requiring workarounds like guarding installation with platform checks in separate script files (reported by @devlead).Previous fix attempts:
CreateRidSpecificToolPackages=false, but this only affects pluralRuntimeIdentifiersand had no effect on the singularRuntimeIdentifier=win-x64inherited fromDirectory.Build.props.$(RuntimeIdentifier)to fix runtime file discovery (SignTool 0.9.1-beta.26080.1 is broken. #978), but made the entire package RID-specific, creating SignTool 0.9.1-beta.26102.1 is broken #984.This PR addresses the root cause by clearing
RuntimeIdentifierinSign.Cli.csprojsodotnet packproduces thetools/net8.0/any/layout. SDK file PackagePaths are hardcoded toanyto match. This restores the package layout used by all releases prior to v0.9.1-beta.26080.1 and fixes both issues.Changes
<RuntimeIdentifier />to clear the inheritedwin-x64valueanyin PackagePath (replaces$(RuntimeIdentifier)which would now be empty)win-x64toanynet8.0\win-x64\publish\tonet8.0\publish\)CreateRidSpecificToolPackages=falseVerification
Confirmed the resulting nupkg layout matches the last known-good release (v0.9.1-beta.25278.1):
tools/net8.0/any/win-x64/, SDK underany/tools/net8.0/win-x64/tools/net8.0/any/