C# - program does not contain a static 'main' method suitable for an entry point

A common reason for this error is that you using the wrong type of project output. In Visual Studio try the following and rebuild:

  • Right click the failing project
  • "Properties"
  • Set "Output Type" to "Class Library".

Another reason may be that you have your main method to be async but have forgotten to change the return type from void to task. Your method should look somewhat like the following:

static async Task Main(string[] args)
{
   //Your code goes here!
}

I hope you find this short post helpful, please leave a comment down below! :)