pp-*_*man 2 c# system.drawing reference visual-studio
好的,所以我在过去的4个小时内遇到这个bug,我不知道该怎么做..
我正在使用Visual Studio Community 2017,我打开了Consol App(.net core)项目.我也在使用Windows 8.1操作系统.
我想使用System.Drawing命名空间中的Image并且它一直给我错误:"找不到类型或命名空间名称'Image'(你是否缺少using指令或程序集引用?)"
我从https://www.dllme.com/dll/files/system_drawing_dll.html (到桌面)下载了System.Drawing.dll ,然后右键单击右侧项目 - > add-> Reference ..-> Browse ..-> System.Drawing.dll->好的然后我在项目依赖项 - > Assemblies-> System.Drawing的项目中(在解决方案资源管理器中)看到所以我猜它的工作正常吗?!
我仍然得到相同的错误,不能使用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");
}
}
}
Run Code Online (Sandbox Code Playgroud)
}
| 归档时间: |
|
| 查看次数: |
1809 次 |
| 最近记录: |