Creating this issue to track the porting of System.Windows.Forms.DataVisualization.dll into Core.
This assembly eagerly attempts to load OleDB types - which is problematic unless and until we port OleDB to .NET Core. However it looks quite possible to segregate the OleDB types so that they are only loaded if the caller actually wants to use OleDB and this would be worth doing.
All the usage is in a single class ChartImage and it is all protected by checks like if (obj is OleDbDataAdapter). Those can likely be replaced with if (obj.GetType().FullName == "System.Data.OleDbDataAdapter") or similar -- and only if the test is true then would it call into a new class that would reference these types properly and cause them to load.
I work on a project which generates charts server side into images and it would be great to get that onto Core as it's the only part of the app which still relies on .NET Framework.
Would love to see this - there is no reasonable way to achieve charting in .NET Core without it!
Is there a way I can do the required work?
@davidnmbond apparently this is already mostly done, @merriemcgaw commented something along those lines in #510
We have DataVisualization in preview 4 now. And most of sad thing it's considered deprecated :((
I posted a question about it...
I have added guidance on using the new ported types to our porting guidelines https://github.com/dotnet/winforms/blob/master/Documentation/porting-guidelines.md#include-the-systemwindowsformsdatavisualization-pack
Most helpful comment
This assembly eagerly attempts to load OleDB types - which is problematic unless and until we port OleDB to .NET Core. However it looks quite possible to segregate the OleDB types so that they are only loaded if the caller actually wants to use OleDB and this would be worth doing.
All the usage is in a single class
ChartImageand it is all protected by checks likeif (obj is OleDbDataAdapter). Those can likely be replaced withif (obj.GetType().FullName == "System.Data.OleDbDataAdapter")or similar -- and only if the test is true then would it call into a new class that would reference these types properly and cause them to load.