Docker build failing
Hey so i am getting
CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [project]
when running the dockerfile which i generated with VS. I am using .net 6.15 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
there is no static Main in the code since its dotnet 6
Show the Dockerfile as well as the entry point in your code
i got no entry point i just start right into it
Even if it's a top-level program, it has an implicit main-method in that file, just compiled behind the scenes. Every program needs an entry point
Show the code where you expect your program to start executing from
The dockerfile looks right to me
Delete that entire line at the top of that screenshot
The code will start executing on the line with
try
now (assuming what you've shown is the Program.cs)Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
still the same
what do you mean ?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Can you show the whole file?
This looks like a correct top-level entrypoint
ok so an docker problem ?
Sounds like more a compile-time issue. Are you sure it's building your docker image?