Why does LINQPad 7 include its own version of System.Windows.Forms.DataVisualization?
I've already asked this on stackoverflow but this behaviour seems weird in LINQPad.
Why does LINQPad provide LINQPad.Windows.Forms.DataVisualization.dll in the first place? I think users should instead resolve this from https://www.nuget.org/packages/System.Windows.Forms.DataVisualization if they require it. Otherwise if a user is using the official version in a dependency in the LINQPad script, it causes an (unresolvable?) namespace conflict with the LINQPad dll.
Comments
LINQPad.Windows.Forms.DataVisualization provides the dump extensions methods for System.Windows.Forms.DataVisualization.
It is specific to LINQPad for dumping charts.
That NuGet package is a prerelease for .NET 3.0 and hasn't been updated since February 2020. I seem to remember that it contains a bug that's sometimes a blocking issue - this is why LINQPad uses a forked version. I'll look into whether there's an easy way to work around the binding issues.
Side note:
System.Windows.Forms.DataVisualization --version 1.0.0-prerelease.20110.1 is deprecated!
https://github.com/dotnet/winforms-datavisualization
I remembered searching the docs a while ago for .net, std, core, and 6 charting and only found this:
https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.datavisualization.charting?view=netframework-4.8.1
@JoeAlbahari What's the difference between charting in v5 vs v7? Are charting features backported?
@JoeAlbahari My concern is because I mingle queries built for specific versions, using new features and will need v5 for the next 100 years at some point v5 queries will break if you have a forks that is forward looking only.
This is a challenge.
This is why I love LINQPad.
A way to find issues in queries and test whether a query will work (run and compile) in V5 and V7 you can use Util.Run or Util.Compile then based on exceptions fix any problems.
Here is an example output:
In the example an exception is present in study-file8 in V5 because it uses IFrame not found in V5.
So in my case I will run this solution on all queries with charts in V5 and V7 to find issues if any.
This may be outside this discussion but I thought I'd share.