WinFormsComInterop icon indicating copy to clipboard operation
WinFormsComInterop copied to clipboard

Support for System.Windows.Forms.DataVisualization?

Open arcutright opened this issue 2 years ago • 3 comments

This used to be included in WinForms but was extracted to https://github.com/dotnet/winforms-datavisualization during the NET 5.0 transition. Currently, the only way to enable trimming with WinForms using chart controls is to use this port and adding this line to the csproj to exclude the entire namespace from trimming.

<TrimmerRootAssembly Include="System.Windows.Forms.DataVisualization" />

arcutright avatar Sep 12 '22 00:09 arcutright

Does trimming problems comes from Editors or from reflection usage. I assume that’s from reflection usage because probably you have to specify properties which you want to display.

this project targeting on solving problem of COM dependencies in your app, but this is require augment of DataVisualization. Is there something specific that you want?

kant2002 avatar Sep 12 '22 02:09 kant2002

I was probably getting confused between trimming in .net6 and general .net7 compatibility issues, I can't seem to recreate whatever issue I was seeing in net6 with trimming. The entire charting library seems to be built around reflection as you mentioned so I'm not sure if it would ever work with trimming.

arcutright avatar Sep 14 '22 01:09 arcutright

If you have any issues with missing types you can try to root them by providing XML file with linker descriptors like shown here https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options?pivots=dotnet-6-0#root-descriptors

kant2002 avatar Sep 14 '22 02:09 kant2002