无法添加 System.Drawing.dll 参考
can't add System.Drawing.dll reference
好的,所以我在过去的 4 小时里一直在处理这个错误,我不知道该怎么办..
我正在使用 Visual Studio Community 2017,我打开了 Consol App(.net core) 项目。我也在研究 windows 8.1 OS.
我想使用来自 System.Drawing 命名空间的图像,但它一直给我这个错误:
"the type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?)"
我从 https://www.dllme.com/dll/files/system_drawing_dll.html 下载了 System.Drawing.dll
(到桌面)然后右击右项目->add->Reference..->Browse..->System.Drawing.dll->OK
然后我在项目 dependencies->Assemblies->System.Drawing 中的项目(在 Solution Explorer 中)中看到,所以我猜它工作正常?!
我仍然遇到同样的错误,无法使用 System.Drawing 命名空间,有什么建议吗?
using System;
using System.Net.Sockets;
using System.Drawing;
namespace client2
{
class Program
{
static void Main(string[] args)
{
try
{
//read image
Image image = new Image("C:\image\amir.jpg");
}
}
}
}
System.Drawing
不是 .NET (Core) 的跨平台部分的一部分。它取决于 GDI+,它是 Windows 的一部分。那里有很多选择。
旁白:切勿从不受信任的来源下载 DLL。
好的,所以我在过去的 4 小时里一直在处理这个错误,我不知道该怎么办..
我正在使用 Visual Studio Community 2017,我打开了 Consol App(.net core) 项目。我也在研究 windows 8.1 OS.
我想使用来自 System.Drawing 命名空间的图像,但它一直给我这个错误: "the type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?)"
我从 https://www.dllme.com/dll/files/system_drawing_dll.html 下载了 System.Drawing.dll (到桌面)然后右击右项目->add->Reference..->Browse..->System.Drawing.dll->OK 然后我在项目 dependencies->Assemblies->System.Drawing 中的项目(在 Solution Explorer 中)中看到,所以我猜它工作正常?!
我仍然遇到同样的错误,无法使用 System.Drawing 命名空间,有什么建议吗?
using System;
using System.Net.Sockets;
using System.Drawing;
namespace client2
{
class Program
{
static void Main(string[] args)
{
try
{
//read image
Image image = new Image("C:\image\amir.jpg");
}
}
}
}
System.Drawing
不是 .NET (Core) 的跨平台部分的一部分。它取决于 GDI+,它是 Windows 的一部分。那里有很多选择。
旁白:切勿从不受信任的来源下载 DLL。