我是Visual Studio的初学者,我可以很好地创建Windows From Projects和Console Projects,但我无法编译Empty Projects。
我采取的步骤是:
- Create an Empty Project.
- Add a class, add a reference to System and System.Windows.Forms
Put the following code in the class:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace Circles { class Program { static void Main(string[] args) { MessageBox.Show("Hello World!"); } } }
程序“D:\ C#\ Projects \ Circles \ Circles \ obj \ x86 \ Debug \ Circles.exe”不包含适用于入口点Circles的静态“Main”方法。
属性构建操作设置为编译,但是项目属性中的启动对象未设置,这是否导致问题?如果是,我该怎么办?
编辑:问题已解决,请参见CharithJ的答案。 谢谢大家。