Asp.Net Core: Program does not contain a static 'Main' method suitable for an entry point

后端 未结 7 1967
[愿得一人]
[愿得一人] 2021-01-04 04:18

I am trying to port my Asp.Net WebApi project, based on the Onion Architecture design approach, over to Asp.Net Core. However, when I build my class libraries, the compiler

7条回答
  •  误落风尘
    2021-01-04 04:42

    If the Main method has an async modifier, make sure that the selected C# language version is 7.1 or higher. You can fix the issue by adding below element to the .csproj file manually. Reference

    
      latest
    
    

提交回复
热议问题