Skip to content

Conversation

@github-actions
Copy link
Contributor

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

Backport of #119132 to release/10.0

/cc @jkotas

Customer Impact

  • Customer reported
  • Found internally

This change makes it easier to diagnose COM interop (WinRT) bugs where it rehydrates wrong type. Before this change, this type of CsWinRT bug results into runtime crash that requires significant effort and good amount of luck to diagnose. After this change, the same CsWinRT bug produces InvalidCastException right when the issue occurs.

Regression

  • Yes
  • No

Testing

Standard regression pass

Risk

Low

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.

Prevents hard to diagnose crashes caused by COM interop rehydrating wrong type.
@jkotas jkotas requested a review from agocke August 27, 2025 13:06
@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 10.0.0 milestone Aug 27, 2025
@AaronRobinsonMSFT AaronRobinsonMSFT added the Servicing-consider Issue for next servicing release review label Aug 27, 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.

approved. we can merge when ready

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 27, 2025
@jeffschwMSFT jeffschwMSFT merged commit a4210ec into release/10.0 Aug 27, 2025
152 of 157 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the backport/pr-119132-to-release/10.0 branch August 27, 2025 16:49
@agocke
Copy link
Member

agocke commented Aug 28, 2025

fyi @jevansaks @manodasanW whenever this flows to you there's a chance it could catch other places where you may be returning an invalid value.

@jevansaks
Copy link

Thanks for the heads up! Are you planning to bring it to net9 also? If it's just in net10 then we can watch out for it when we're migrating.

@jkotas
Copy link
Member

jkotas commented Aug 28, 2025

We do not plan to bring this to net9.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants