Skip to content

[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
merged 10 commits into from
Jun 7, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 3, 2025

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

  • Customer reported
  • Found internally

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

  • Yes
  • No

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:

  • The PR target branch is release/X.0-staging, not release/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.

agocke added 8 commits June 3, 2025 04:18
#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.
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a 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

@jeffschwMSFT jeffschwMSFT added Servicing-consider Issue for next servicing release review area-AssemblyLoader-coreclr labels Jun 3, 2025
@jeffschwMSFT jeffschwMSFT added this to the 9.0.x milestone Jun 3, 2025
Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

@rbhanda rbhanda modified the milestones: 9.0.x, 9.0.7 Jun 3, 2025
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jun 3, 2025
@agocke agocke enabled auto-merge (squash) June 7, 2025 04:40
@agocke
Copy link
Member

agocke commented Jun 7, 2025

/ba-g failures are timeouts that are unrelated

@agocke agocke merged commit 3090813 into release/9.0-staging Jun 7, 2025
147 of 149 checks passed
@agocke agocke deleted the backport/pr-115315-to-release/9.0-staging branch June 7, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants