我有一個現有的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的,但我有錯誤訊息
應用程序不能在當前的背景下存在。
如何解決這個問題?