Home c# The program does not contain a static Main method

The program does not contain a static Main method




There are several projects in the solution. Only in one project I have a Program class with the Main method. Always everything was fine, and now gives out such a mistake. I can not understand what the problem is. It seems to be all right.
Enter the image description here

Answer 1, Authority 100%

It can be seen that an error in the project Entity.

The entry point is always required for the “Console Application” and “Windows Applications”. If you entity thinks like one of these two options, add the corresponding static method into it, without it. Because any application should begin with any entry point.

But if you think this project as a “classes library”, then go to the project properties and select “Output” – “Class Library”. In this case, the entry point is not required.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions