I am new to C# and I am trying to create a bitmap object in C# in Visual Studio 2019, but it isn't working. I have .NET Framework updated to the latest version and I have resharper installed. I am using Windows 10.
Ive tried adding the references manually with Add/Reference... and it does not stay checked.
I added using system.drawing
and using system.drawing.common
to the top of my code.
I updated my .net core and enabled it in my project.
using System;
using System.Drawing.Common;
namespace Bot
{
class Program
{
static void Main(string[] args)
{
var bmp = new Bitmap();
}
}
}
I expected it to create a bitmap object, but it won't compile and gives me errors saying that the bitmap object does not exist in system.drawing
.