初学c# 写了一个最简单程序
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            global::System.Windows.Forms.MessageBox.Show("Test");
        }
    }
}
但是最后还是报错 1 命名空间“System”中不存在类型或命名空间名称“Windows”(是缺少程序集引用吗?)
强制执行后 出现          “由于缺少调试目标"E:\vs 2005\ConsoleAppliction4\ConsoleAppliction4.exe",Visual Studio 无法开始调试。请生成项目重试,或者相应的设置OutputPath和AssemblyName 属性,使其指向目标程序集的正确位置。”
请问大侠 是不是vs 2005 的设置有问题呀,该怎么设置?
最好详细一点  万分感谢!!!
用Microsoft .NET Framework 2.0能直接编译出来

解决方案 »

  1.   

    你的应用程序类型是winform么?如果是非winform项目,那自然要手工添加够不够空间了
      

  2.   

    右击引用,然后选择你要引用的System.Windows.Forms
      

  3.   

    如果是Webform,只须添加引用System.Windows.Forms即可
      

  4.   

    检查引用里有System.Windows.Forms没
      

  5.   

    右击项目点添加引用,然后选择System.Windows.Forms
      

  6.   

    在引用中  把system.dll文件添加到引用 中
      

  7.   

    右击引用,然后选项中没有想要的类怎么办?比如System.Windows.Controls.Toolkit
      

  8.   

    右击引用,为什么没有System.Windows.Forms呢,只有System.Windows