Program does not contain a static 'Main' method suitable for an entry point


Question

Suddenly my whole project stopped compiling at all, showing the following message:

Program 'path_to_obj_project_folder' does not contain a static 'Main' method suitable for an entry point

I made no changes to project properties, just added some classes, moved some other classes into folders. Its an WPF Application project so it should be all OK. Entry point is where it should be, file App.xaml was not modified at all :(

What should I do to make it work again?

1
164
7/12/2016 9:31:55 PM

Accepted Answer

Check the properties of App.xaml. Is the Build Action still ApplicationDefinition?

414
9/27/2011 2:53:13 PM

Maybe the "Output type" in properties->Application of the project must be a "Class Library" instead of console or windows application.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon