创建一个 Dotnet Web API 项目使用了系统默认创建的 docker file 结果遇到了两个错误。第一个是不能复制 csproj 文件,第二个就是这个:
Program does not contain a static 'Main' method suitable for an entry point
解决方案
把 dockerfile 挪到和解决方案文件 (.sln文件)的同一层。
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/e71e90c89ce2804ca515aab64ff59d60.png)
参考链接
https://stackoverflow.com/questions/52991469/getting-program-does-not-contain-a-static-main-method-suitable-for-an-entry-p/63257667#63257667