Search code examples
c#visual-studio-codesystem.drawingopentk

VS code how to add System.Drawing


I want to use system.drawing in my project but I cant make it work. I have found this question, but it shows only how to add SQLite.NET-PCL, if I try doing it the same way for System.Drawing it doesnt work.

Here is my project.json:

{
"version": "1.0.0-*",
"buildOptions": {
  "debugType": "portable",
  "emitEntryPoint": true
},
"dependencies": {
},
"frameworks": {
  "net461": {
    "dependencies": {
      "OpenTK": "2.0.0*"
    }
  }
},
"runtimes": {
  "win7-x64": {},
  "win10-x64": {}
}
}

If I try adding System.Drawing it tries to autocomplete to "System.Drawing" : "1.0.0-beta004" which doesnt work with opentk. I am trying to save a image from OpenTK. Is there a way to make this work in VS code?


Solution

  • I have found the library "CoreCompat.System.Drawing" : "1.0.0-beta006", which kind of works with OpenTK.