[release/10.0.1xx] Add System.Private.Windows.GdiPlus to WPF#3120
Merged
ericstj merged 1 commit intorelease/10.0.1xxfrom Oct 29, 2025
Merged
[release/10.0.1xx] Add System.Private.Windows.GdiPlus to WPF#3120ericstj merged 1 commit intorelease/10.0.1xxfrom
ericstj merged 1 commit intorelease/10.0.1xxfrom
Conversation
JeremyKuhne
approved these changes
Oct 28, 2025
Member
Author
|
This was approved over email and @mmitche let me know that release/10.0.1xx is open for approved fixes for 10.0.1 / 10.0.101. |
Member
Author
|
/backport to main |
Contributor
|
Started backporting to |
Member
Open now. |
This was referenced Nov 12, 2025
This was referenced Dec 9, 2025
Merged
Closed
Bump Microsoft.Extensions.Localization.Abstractions from 10.0.0 to 10.0.1
tiksn/TIKSN-Framework#2501
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Customer Impact
When applying a using statement or casting any of the following types to an interface in a WPF project, a compiler error is emitted: Bitmap, Image, MetaFile, Icon, Graphics.
Background
Due to dotnet/roslyn#80921 my fix #2839 for dotnet/sdk#51173 was incomplete. When any interface cast or using statement is applied to Bitmap or any other type that implements internal interfaces from System.Private.Windows.GdiPlus the compiler will fail with CS0012 error, even though it does not need to call those interfaces.
To workaround this, the reference can be added to the project, in the same way as before - see dotnet/sdk#51173 (comment)
We missed this in the first fix as we didn't test a user scenario involving a cast or a using statement on one of the impacted types. This fix does not omit any other private dependencies of System.Drawing.Common.
Regression
Regressed in .NET 10.0 when enabling pruning for WindowsDesktop shared framework, fix in GA was not complete.
Testing
Verified customer repro is fixed. Verified closure of System.Drawing.Common is exposed for reference -- no other assembly private or otherwise is omitted.
Risk
Low - this is essentially just extending the previous fix. The added assembly contains entirely internal API.