-2

I want to take a screenshot in a console application (not windows forms), then I want to take that screenshot and send it to my friend through socket, but so far I don't have any issues with socket.

All tutorials I can find use windows forms and use:

using System.Drawing.Imaging;

But if I try to do that, it gives me an error saying:

"The type or namespace name 'Imaging' does not exist in the namespace 'System.Drawing'"

Can you help me?

Igal
  • 163
  • 1
  • 10
Sebastian
  • 1
  • 1
  • [This](https://stackoverflow.com/questions/46722409/cannot-find-bitmap-class-in-class-library-net-standard) may explain the error message. I cannot promise it will solve all of your problems. – Ruud Helderman Aug 16 '20 at 14:43
  • .NET Core or Framework? What version? You'll need to add a reference / install a NuGet package. If on Framework, it's a reference to `System.Drawing`; if on Core, it's a NuGet package, `System.Drawing.Common` – CoolBots Aug 16 '20 at 14:57

1 Answers1

0

Like CoolBots said in the comments, System.Drawing isn't included in Console Applications. If you're using Visual Studio, right click on your project and select 'Manage NuGet Packages'. The click 'Browse' and search for System.Drawing. A package called System.Drawing.Common should pop-up. Download that and your problem should be solved.

Thrith
  • 35
  • 8