Skip to content

Fix SDK extraction failing on tarballs with symlinks (11.0.100-preview.2.26159.112)#326

Merged
agocke merged 1 commit intodn-vm:mainfrom
ramonsmits:fix-symlink-extraction
Mar 16, 2026
Merged

Fix SDK extraction failing on tarballs with symlinks (11.0.100-preview.2.26159.112)#326
agocke merged 1 commit intodn-vm:mainfrom
ramonsmits:fix-symlink-extraction

Conversation

@ramonsmits
Copy link
Contributor

Summary

.NET 11 Preview 2+ SDK tarballs use symlink deduplication to reduce archive size (~140 MB of duplicates on Linux x64). After tar extraction, these symlinks cause ExtractSdkToDir to fail because Zio's virtual filesystem cannot move symlinks.

Error: Extract failed: Could not find file
'/tmp/.../sdk/11.0.100-preview.2.26159.112/FSharp/System.Security.Cryptography.ProtectedData.dll'.
  • Add ResolveSymlinks that replaces symlinks with copies of their target files after tar extraction, before the Zio-based copy phase
  • Add ExtractSdkWithSymlinks test that creates a tarball mimicking the .NET 11 deduplication layout and verifies extraction succeeds
  • Test skips cleanly on Windows (Assert.SkipWhen) and on filesystems without symlink support (Assert.Skip)

Test plan

  • New ExtractSdkWithSymlinks test passes
  • All 25 existing InstallTests pass
  • dotnet format clean
  • Zero warnings, zero errors on build

.NET 11 Preview 2+ SDK tarballs use symlink deduplication to reduce
archive size. Zio's virtual filesystem cannot move symlinks, causing
ExtractSdkToDir to fail with "Could not find file" errors.

Resolve symlinks to regular files after tar extraction, before the
Zio-based copy phase.
@ramonsmits ramonsmits marked this pull request as ready for review March 14, 2026 14:34
@ramonsmits ramonsmits changed the title Fix SDK extraction failing on tarballs with symlinks Fix SDK extraction failing on tarballs with symlinks (11.0.100-preview.2.26159.112) Mar 14, 2026
Copy link
Collaborator

@agocke agocke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@agocke agocke merged commit 298ba49 into dn-vm:main Mar 16, 2026
3 checks passed
@agocke agocke mentioned this pull request Mar 16, 2026
agocke added a commit that referenced this pull request Mar 16, 2026
## Summary

Bump version to 1.1.2 for the next release.

## Changes since v1.1.1

### Bug Fixes
* Fix SDK extraction failing on tarballs with symlinks (.NET 11 Preview
2+) #326

### Dependencies
* Bump Azure.Security.KeyVault.Keys from 4.8.0 to 4.9.0
* Bump coverlet.collector from 6.0.4 to 8.0.0
* Bump xunit.v3 from 3.2.1 to 3.2.2
* Bump Microsoft.NET.Test.Sdk from 18.0.1 to 18.3.0
* Bump Serde from 0.10.0 to 0.10.2

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants