[release/9.0] Disable ResolveLinkTarget_Succeeds returnFinalTarget=true for UNC paths#124867
Open
Copilot wants to merge 2 commits intorelease/9.0from
Open
[release/9.0] Disable ResolveLinkTarget_Succeeds returnFinalTarget=true for UNC paths#124867Copilot wants to merge 2 commits intorelease/9.0from
Copilot wants to merge 2 commits intorelease/9.0from
Conversation
Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing ResolveLinkTarget_Succeeds test for UNC paths
Fix ResolveLinkTarget_Succeeds test failure on Windows with UNC paths disabled
Feb 25, 2026
Copilot stopped work on behalf of
jozkee due to an error
February 25, 2026 17:54
Contributor
There was a problem hiding this comment.
Pull request overview
Updates symbolic link test data generation to avoid UNC network resolution failures on Windows configurations where UNC access is disabled, stabilizing CI for ResolveLinkTarget_Succeeds.
Changes:
- Split
SymbolicLink_ResolveLinkTarget_PathToTarget_Datageneration to coverreturnFinalTarget=false/trueonly for non-UNC paths. - Restrict UNC path cases to
returnFinalTarget=falseto prevent Windows from attempting UNC resolution.
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-io |
jozkee
approved these changes
Feb 25, 2026
This was referenced Feb 25, 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.
ResolveLinkTarget_Succeedsfails withIOException: The specified network name is no longer availableon Windows versions that have UNC access disabled, becauseSymbolicLink_ResolveLinkTarget_PathToTarget_Datawas yielding UNC paths withreturnFinalTarget=true, causing Windows to actually attempt to resolve\\LOCALHOST\share\path.main PR
Description
BaseSymbolicLinks.cs, splitSymbolicLink_ResolveLinkTarget_PathToTarget_Datato iteratePathToTargetDatawith bothreturnFinalTarget=false/true, but restrictPathToTargetUncDatatoreturnFinalTarget=falseonlyCustomer Impact
Tests in
FileInfo_SymbolicLinks,File_SymbolicLinks,DirectoryInfo_SymbolicLinks, andDirectory_SymbolicLinksare failing on affected Windows machines, blocking CI.Regression
Not a product regression — test infrastructure issue. Triggered by Windows policy changes disabling UNC paths on certain machines.
Testing
Minimal test-only change. The fix narrows the test matrix for UNC paths to avoid exercising the network resolution path that is unavailable on restricted machines.
Risk
Very low. Single-line logic change scoped entirely to test data generation. No production code touched. Reduces test coverage only for a scenario (
returnFinalTarget=trueon UNC paths) that cannot reliably run in affected environments.Package authoring no longer needed in .NET 9
IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.
Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.