Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 18, 2025

Backport of #118827 to release/9.0-staging

/cc @AaronRobinsonMSFT @jkotas

Customer Impact

  • Customer reported
  • Found internally

This issue was reported in #118741. In 9.0.5 servicing a more strict check was made for this case - running managed code in DllMain. This more stricter case is now blocking IJW scenarios since the added assert will now trigger on all builds. This changes the assert to be non-retail builds for when IJW is involved, it is limited to scenarios involving IJW. This change is also not a fix as the underlying issue, running managed code in DllMain, since it represents a likely bug in MSVC. We are working with MSVC to get a fix for the underlying issue.

Regression

  • Yes
  • No

Introduced in #113055. This created an explicit check for a case that has long been an invalid scenario - no managed code may run during DllMain, see here.

Testing

The scenario was repro 100 % of the time due to emitted code. Removing the all build asserts avoids the check and allows for a non-noisy shut down when IJW assemblies are loaded in the process.

Risk

Low. This change is limited to scenarios when IJW assemblies are loaded and reverts back to not checking invalid behavior instead of being explicit. This resets to 9.0.4 behavior when IJW is in the process.

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.

jkotas and others added 2 commits August 18, 2025 14:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 9.0.x milestone Aug 18, 2025
@AaronRobinsonMSFT AaronRobinsonMSFT added area-Interop-coreclr Servicing-consider Issue for next servicing release review labels Aug 18, 2025
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

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@rbhanda rbhanda modified the milestones: 9.0.x, 9.0.10 Aug 21, 2025
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 21, 2025
@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 1080780 into release/9.0-staging Aug 21, 2025
99 of 104 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the backport/pr-118827-to-release/9.0-staging branch August 21, 2025 18:17
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-VM-coreclr Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants