-
Notifications
You must be signed in to change notification settings - Fork 980
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
Epic - Make WinForms trim compatible #4649
Comments
From an offline chat with @agocke:
Useful docs: |
I find no mention of COM interop in the links, the warnings about COM interop not being supported are worrying ( Furthermore the text mentions trimming of COM interfaces yet only reports P/Invoke signatures. That has me worried that I really hope these are just false positives and COM interop is supported, or at least can be supported by custom annotations, otherwise I don't think WinForms can be made compatible. |
Adding this to our dotnet/planning/issues/27 theme |
Progress towards dotnet#5163 and dotnet#4649
I did try trim recent version of WinForms and what are the log which I receive 640 rows. Most issues which I see is from Design namespace which for most application does not make sense. Also I do not think that in practice that would make sense to target that namespace without additional work on Designer which happens in private. So I remove from log these warnings and receive smaller file of 260 rows. I look again, and next target for questionable warnings would be Converters which is mostly used during design-time. Also So I would like to ask questions
|
The designer codebase has its own copies of several runtime types (for various reasons). Most of the types that are present in this codebase can and are used in runtime scenarios (see https://github.com/dotnet/winforms/issues?q=label%3A%22area%3A+designer+support%22+sort%3Acreated-desc), e.g., editors and type converters are invoked via the |
Right now this epic isn't high on the team's backlog, and you're paving the road :) (and we are very appreciative of your work, thank you). Which means you can split and dice it any way you wish. with_design.txt contains only the following warnings: IL2050, IL2094, IL2093, IL2092, IL2046, IL2026, IL2072, IL2075, IL2067, IL2057, IL2062, IL2070, IL2111, IL2087. without_design.txt contains all the same list without IL2087. |
That's interesting observation. I did not notice that.
I would like (for now) discuss what's in principle should be done. Kind of meta-discussion. I would like to get rid of undocumented My understanding is that System.Windows.Forms.Design assembly provide supplementary code for WinForms designer. They provide different kind of actions which can happens with control, hints, etc. That's important part of experience for WinForms, but that code mostly run in Designer app. So trimming block does not applied to that code IMO.
Yes. That's kind of problems which I would like to surface in my attempt to assess what's blocking this issue. I completely forgot about
From where I am now, I cannot assess, is this kind of applications can prevent removal of |
Make sure that the code from Design namespace is not getting rooted and that it gets trimmed in a typical WinForms apps. Code that gets trimmed won't produce warnings. https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming is a general guidance for how to prepare libraries for trimming. |
Please, make Windows Forms compatible with trimming. |
Can you estimate when Native AOT will support Windows Forms? Time or version of .NET. |
@merriemcgaw, just to get this Epic on your radar for planning. Also @elachlan FYI (I am sure, he wants to be in the loop). |
@mikola-akbal: Just as an update: we have started work in the runtime a while ago, and I am starting to investigate Binding from the runtime and the Out-Of-Proc Designer side. |
Bless all of you working on this. If you've been in the weeds its easy to forget how revolutionary (and massive) this is. Q: If this doesn't quite make it completely for 9 STS, will that mean that it won't make it into 10 LTS? or will it probably end up in 10 LTS 90% complete regardless? |
The TrimTest project tracks a simple WinForms application for trimming purposes. This project generates 2535 trim warnings -
Default_Trimmed_Warnings.txt.
Below issues track the work related to getting the warnings addressed.
Linked to this epic
The text was updated successfully, but these errors were encountered: