[release/9.0-staging] Fix crash when pTargetMD is null by github-actions[bot] · Pull Request #110652 · dotnet/runtime

Backport of #110650 to release/9.0-staging

/cc @thaystg

Customer Impact

  • Customer reported
  • Found internally

It was found internally, it's crashing while debugging an app. It was caused by a backport recently merged: #110438, it's not shipped yet and it's important to fix it before shipping.

Regression

  • Yes
  • No

It was introduced here: #110334

Testing

We manually tested.

Risk

Low risk, only checking if a variable is null.

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.