System.Drawing命名空间下的控制台应用程序未找到 [英] System.drawing namespace not found under console application

查看:709
本文介绍了System.Drawing命名空间下的控制台应用程序未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我选择的控制台应用程序作为我的C#项目。但是,这似乎下的Windows窗体工程犯规上班进口似乎在这里工作。它说,绘图命名空间不存在。

 使用System.Drawing中;
使用System.Drawing.Imaging;

我的问题是,我需要有Bitmap类。我试图做一个命令行应用程序,并位操作,以一个形象。这就是为什么我没有选择我的项目是一个Windows窗体的之一。


解决方案

  1. 右键点击控制台应用程序的属性。

  2. 检查目标框架

  3. 如果是.NET框架4.0客户端配置文件比改变到.NET Framework 4.0

这是现在的工作。

I selected console application as my C# project. But the imports that seemed to work under windows form project doesnt seem to work here. It says that the drawing namespace does not exist.

using System.Drawing;
using System.Drawing.Imaging;

My problem is that i need to have the bitmap class. I am trying to make a command line app that does bitmap manipulations to a image. That's why i didn't chose my project to be a windows form's one.

解决方案

  1. Right click on properties of Console Application.
  2. Check Target framework
  3. If it is .net framework 4.0 Client Profile than change it to .NET Framework 4.0

It is work now.

这篇关于System.Drawing命名空间下的控制台应用程序未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆