我有一个现有的winform应用程序没有使用Program.cs。我想与常规码名称应用程序在当前上下文中不存在
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
添加Program.cs的,但我有错误讯息
应用程序不能在当前的背景下存在。
如何解决这个问题?