创建一个 Dotnet Web API 项目使用了系统默认创建的 docker file 结果遇到了两个错误。第一个是不能复制 csproj 文件,第二个就是这个:
Program does not contain a static 'Main' method suitable for an entry point
解决方案
把 dockerfile 挪到和解决方案文件 (.sln文件)的同一层。

参考链接
https://stackoverflow.com/questions/52991469/getting-program-does-not-contain-a-static-main-method-suitable-for-an-entry-p/63257667#63257667