You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate consolidating ReplaceFilesWithSymbolicLinks into DeduplicateAssembliesWithLinks #52815
We now have two tasks that deduplicate files in the SDK layout by creating symbolic links:
ReplaceFilesWithSymbolicLinks
DeduplicateAssembliesWithLinks
Input
Two directories: Directory and LinkToFilesFrom
Single directory: LayoutDirectory
Matching
By filename (then verifies content)
By content hash (filenames can differ)
Scope
Links files from one known location to another
Finds duplicates anywhere in the tree
Platform
Unix only
Cross-platform
Link type
Symlinks only
Hard links or symlinks
File types
All files
Assemblies only (.dll/.exe)
ReplaceFilesWithSymbolicLinks is used specifically to link runtime pack files to shared framework files, while DeduplicateAssembliesWithLinks is a general-purpose
deduplication task.
Proposal
Investigate whether ReplaceFilesWithSymbolicLinks can be removed in favor of DeduplicateAssembliesWithLinks, which would:
Simplify maintenance (one task instead of two)
Provide cross-platform support (including Windows)
Use a more robust content-hash-based approach
Investigation needed
Determine what file types are actually linked by ReplaceFilesWithSymbolicLinks
If only assemblies (.dll/.exe), DeduplicateAssembliesWithLinks already covers this
If native libraries or other files are linked, DeduplicateAssembliesWithLinks would need to be extended
Verify primary selection works correctly
DeduplicateAssembliesWithLinks selects the primary by depth (shallowest) then alphabetically
Shared framework files should be selected over runtime pack files (they're at a shallower depth)
Consider extending DeduplicateAssembliesWithLinks to handle native libraries (.so, .dylib) if needed
Activity
dotnet-policy-service commentedon Feb 3, 2026
@dotnet/illink a new issue has been filed in the ILLink area, please triage