[release/7.0] Add more type-forwarders for Xamarin.Android compatibility to mscorlib.dll and System.Drawing.Common.dll #83137
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.
Backport of #82618 and #82839 to release/7.0
Customer Impact
The legacy Xamarin.Android versions of mscorlib.dll and System.Drawing.Common.dll differed a bit compared to the .NET Framework versions, mostly because of additions for .NET Standard 2.1 support.
This meant that an assembly which was compiled against those assemblies (e.g. from a nuget package which targets
monoandroid
TFM) expects types there but since we didn't have type-forwarders in our mscorlib.dll/System.Drawing.Common.dll shims to point them to the right assembly you'd get a TypeLoadException when running on modern .NET 7 Android.Fixes #82193 and #82829
Also fixes these MAUI issues: dotnet/maui#5142, dotnet/maui#5078, dotnet/maui#3903
Testing
Manual testing with nuget packages from the customer.
Risk
Low, we're only adding a few additional type-forwarders.