-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add diagnostic message when trimming WinForms/WPF for .NET 6 #16716
Comments
@agocke Have we captured the list of concerns for this in a design doc or another issue? Recording this will help with future costing. |
dotnet/runtime#36659 tracks adding the feature flag. I agree that when we add the feature flag we should note that it's disabled by default in trimming because it's not trim safe, then describe why, and the proposed path forward for existing COM uses. fyi @LakshanF |
I don't think we should talk about COM as being the only reason - there are other issues with WinForms. We should have a property which if used will override the message, something like "I Want WinForms Trimmed Anyway". If set I think it would make sense to also revert some of the default feature switches to ON, so that we don't break WinForms on-purpose. The COM feature switch is the obvious first choice. |
Closed by #16892 |
This is certainly necessary for WinForms, it may also be necessary for WPF if it also uses COM.
We have determined that COM is not trim-safe and that WinForms requires it to function. Since the current plan of record is to add a COM feature switch and disable it by default when trimming, WinForms should have an error of the form:
For WPF, if it does not require COM, we should at least provide a top-level warning that WPF is not trim-safe for .NET 6 and is not recommended.
The text was updated successfully, but these errors were encountered: