0 c# reference visual-studio-2010
我正在尝试在不使用MS Designer的情况下为表单编写代码.
当我编译时,我总是得到同样的错误:
System.ComponentModel.*类型在未引用的程序集中定义.
这将出现在IComponent,ISynchronizeInvoke和Component中.我想我已经引用了它.
我已经尝试删除引用并重新应用它,并切换到早期版本的.net.它必须是我环境中的东西,但我找不到它.
using System;
using System.ComponentModel;
using System.Windows.Forms;
public class EmptyForm : System.Windows.Forms.Form
{
public EmptyForm()
{
}
public static int Main()
{
Application.Run(new EmptyForm());
return 0;
}
}
Run Code Online (Sandbox Code Playgroud)
