Repository navigation
Reapply "Deduplicate files using links in mac and linux installers" (#4800) - #4879
Merged
Merged
Conversation
…otnet#4800) This reverts commit d5a0c5a.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reapplies the deduplication feature (#4800) that creates symbolic links in Mac and Linux installers to reduce package size, after the required Arcade signing fixes flowed in via PR #4862. The PR includes a new MSBuild task for copying files while preserving symbolic links, comprehensive end-to-end tests for various installer formats, and refactored test infrastructure.
Changes:
- Introduces
CopyPreservingRelativeSymlinksMSBuild task that preserves relative symbolic links during file copy operations, essential for maintaining deduplicated SDK layouts in installers - Adds comprehensive end-to-end tests for verifying symbolic link preservation in Linux (.deb, .rpm) and macOS (.pkg) installer packages
- Refactors test infrastructure by extracting
MockBuildEngineto a shared file and adding reusable helper methods for artifact discovery and installer validation
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/sdk/src/Tasks/sdk-tasks/CopyPreservingRelativeSymlinks.cs | New MSBuild task that copies files while preserving relative symbolic links instead of resolving them |
| src/sdk/src/Tasks/sdk-tasks/sdk-tasks.InTree.targets | Registers the new CopyPreservingRelativeSymlinks task for use in build targets |
| src/sdk/src/Layout/redist/targets/GenerateInstallerLayout.targets | Uses CopyPreservingRelativeSymlinks to preserve symlinks when copying SDK layout to installer staging directory |
| src/sdk/src/Layout/pkg/dotnet-sdk.proj | Uses CopyPreservingRelativeSymlinks to preserve symlinks when creating package layout |
| src/sdk/test/sdk-tasks.Tests/CopyPreservingRelativeSymlinksTests.cs | Comprehensive unit tests for the new task covering regular files, symlinks, edge cases, and error conditions |
| src/sdk/test/sdk-tasks.Tests/MockBuildEngine.cs | Extracted shared mock IBuildEngine implementation for reuse across test files |
| src/sdk/test/sdk-tasks.Tests/DeduplicateAssembliesWithLinksTests.cs | Removed embedded MockBuildEngine class (now uses shared implementation) |
| src/sdk/test/Microsoft.NET.TestFramework/SdkTestContext.cs | Refactored artifact finding methods to support optional artifacts with filtering and better error messages |
| src/sdk/test/EndToEnd.Tests/Utilities/SymbolicLinkHelpers.cs | Refactored to add VerifyInstallerSymlinks helper that consolidates platform checking, artifact discovery, and validation |
| src/sdk/test/EndToEnd.Tests/GivenSdkArchives.cs | Updated to use refactored ExtractTar helper and improved skip message |
| src/sdk/test/EndToEnd.Tests/GivenDotNetMacInstallers.cs | New test class verifying .pkg packages preserve symbolic links on macOS |
| src/sdk/test/EndToEnd.Tests/GivenDotNetLinuxInstallers.cs | Expanded with new tests for verifying .deb and .rpm packages preserve symbolic links |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dsplaisted
approved these changes
Feb 17, 2026
This was referenced Mar 6, 2026
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.
This reverts commit d5a0c5a.
The arcade signing fixes flowed in with #4862
Validated with a real sign build.