How to use ScottPlot without System.Drawing.Common #655
-
|
I have a WinForms application on .NET 4.8 that implements user controls, i.e. references various types of ScottPlot has a dependency to Adding ScottPlot to the existing application results in: How can I overcome this mismatch? Is there an older version without the dependency to |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
|
Hi @maettu-this, sorry it took so long to get back to you on this. ScottPlot references Once If you have trouble you can look at your csproj file closely to see if there are any references to the old System.Drawing. This is much easier to do with modern SDK style csproj files. Depending on your application, you might find it worthwhile to make the change to a SDK style csproj file anyway https://www.hanselman.com/blog/upgrading-an-existing-net-project-files-to-the-lean-new-csproj-format-from-net-core Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
|
Removing This is why I earlier asked:
If you can tell me the least recent version without the dependency to
This would be the proper solution in my opinion. While there might be technical ways to use |
Beta Was this translation helpful? Give feedback.
-
If you remove the
EDIT: If you installed using System.Drawing;
ScottPlot 3.1.6 is the most recent version that does not use Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
|
Of course I added the |
Beta Was this translation helpful? Give feedback.
-
|
Hey @maettu-this, thanks for looking into it further! If you include a zip of your project would it would be helpful in troubleshooting this issue. I bet you're not the only person who has run into this issue, so figuring out how to fix it would be helpful for future readers as well. I opened Visual Studio, created a new .NET Framework 4.8 WinForms project, installed the ScottPlot package, then drag/dropped a FormsPlot onto the window. It seems to work fine on my end, and you can download this project here: WindowsFormsApp18.zip (you'll need to "rebuild" the project after opening the solution) |
Beta Was this translation helpful? Give feedback.
-
|
Hi @maettu-this, I think we are in agreement about what the problem is: .NET versioning is a hot mess, and Microsoft's transition from .NET Framework to .NET Core over the last several years has a lot of headaches for many people. I believe latest version of C# (version 9) don't even support .NET Framework at all, and Microsoft is pretty clear about their march forward whether we like it or not. Most of this discussion (and apparent disagreement) comes from what to do about the problem. I recognize that it would be more convenient for you to install packages from NuGet that omit the If you give this a try, I'm interested to learn how it works in your hands! Using ScottPlot Without System.Drawing.Common
Build from Source
NuGet Packages✔️ Download NuGet packages of this build: ScottPlot-4.0.47-Framework48-noSDC.zip |
Beta Was this translation helpful? Give feedback.


Hi @maettu-this,
I think we are in agreement about what the problem is: .NET versioning is a hot mess, and Microsoft's transition from .NET Framework to .NET Core over the last several years has a lot of headaches for many people. I believe latest version of C# (version 9) don't even support .NET Framework at all, and Microsoft is pretty clear about their march forward whether we like it or not.
System.Drawing.Commonwas made to ease the transition, but it sounds like it causes problems with Visual Studio 2015 and code bases which are not flexible enough to use it.Most of this discussion (and apparent disagreement) comes from what to do about the problem. I recognize that it would be mor…