C# - Error: "Program does not contain a static 'main' method suitable for an entry point" when building solution

You are likely here because you are trying to make your main method use the async keyword. The gotcha I ran into - which is quite obvious - is that besides adding the async keyword you also have to change the return value from void to Task. The below is an example of an async Main method:

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

Alternatively you may have set the wrong output type for your project. In visual studio you can try the following:

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

I hope you will find this helpful :)