突然间,我的整个项目完全停止编译,并显示以下消息:
Program 'path_to_obj_project_folder' does not contain a static 'Main' method suitable for an entry point
我没有更改项目属性,只是添加了一些类,将其他一些类移到了文件夹中。它是一个 WPF 应用程序项目,因此应该没问题。入口点在它应该在的地方,文件 App.xaml 根本没有被修改:(
我应该怎么做才能让它重新工作?
注意
供引用:如果重命名 App.xaml
可能会发生这种情况。正如 OP 所述,App.xaml
没有改变;但是,这是为重命名 App.xaml
的任何人添加的。
最佳答案
检查 App.xaml 的属性。 Build Action
仍然是 ApplicationDefinition
吗?
关于c# - 如何修复 WPF 错误 : "Program does not contain a static ' Main' method suitable for an entry point"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/577298/