C# 使用System.Drawing.Bitmap有问题

using System;
using System.Drawing;

namespace yingguang
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Bitmap tempBmp;
}
}
}
Program.cs(11,13): error CS0246: 未能找到类型或命名空间名“Bitmap”(是否缺少 using 指令或程序集引用?)
使用的是vscode 和 .Net core

试试如下方法:在“解决方案“下的“引用”,“添加引用”,选择“.net”,找到“System.Drawing”,选中它,点击确定。

System.Drawing需要GDI+,这是windows特有的库。.net core是不是支持,比较玄。
你死马当活马医,引用下看看吧。(光using不行)

System.Drawing 在 .net framework 下 引用

试试命名空间System.Drawing.Bitmap