-
Notifications
You must be signed in to change notification settings - Fork 5k
[release/9.0-staging] Revert change to follow symlinks of dotnet host #116244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
agocke
merged 10 commits into
release/9.0-staging
from
backport/pr-115315-to-release/9.0-staging
Jun 7, 2025
Merged
[release/9.0-staging] Revert change to follow symlinks of dotnet host #116244
agocke
merged 10 commits into
release/9.0-staging
from
backport/pr-115315-to-release/9.0-staging
Jun 7, 2025
Conversation
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
#99576 changed the host to first resolve symlinks before resolving the application directory. This means that relative loads happen relative to the pointed-at file, not the symbolic link. This was a breaking change made to match the symbolic link behavior on all platforms. Unfortunately, it seems a number of users have taken a dependency on the Windows-specific behavior. This PR reverts the change and puts back in place the old Windows behavior.
3 tasks
jeffschwMSFT
approved these changes
Jun 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. we will take for consideration in 9.0.x
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
/ba-g failures are timeouts that are unrelated |
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 is a revert of change #99576 and a revert of the breaking change described in https://learn.microsoft.com/en-us/dotnet/core/compatibility/deployment/9.0/assembly-load-directory
As .NET 9 has rolled out to more users, we've noticed that a number of users relied on the previous behavior of the dotnet host on Windows. The primary value in the change was to present a uniform behavior for the host around symbolic links, which hadn't previously been documented. However, users were depending on the existing symbolic-link behavior on Windows to structure their applications in reasonable scenarios. Due to the impact on users and because .NET 10 is an LTS release, I recommend we revert this change and document the differences between symlink behavior on Windows vs. Unix.
Backport of #115315 to release/9.0
/cc @agocke
Customer Impact
This has been found by multiple users, doing similar things. In both cases it was difficult to discover and potentially difficult to work around, because it involved changing deployment.
Regression
This change as introduced in .NET 9.
Testing
Unit tests have been added to verify the behavior, and specific unit tests that replicate the customer scenarios have been added. The unit tests are running on Windows, Mac, and Linux operating systems.
Risk
Medium. This may have the unfortunate result of breaking users who already adapted to the previous break. However, since .NET 10 may have even more users who discover the break, this is the preferrable option.
IMPORTANT: If this backport is for a servicing release, please verify that:
release/X.0-staging
, notrelease/X.0
.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.