Troubleshooting “program does not contain a static 'Main' method” when it clearly does…?

后端 未结 14 1790
Happy的楠姐
Happy的楠姐 2020-11-30 08:39

My MS Visual C# program was compiling and running just fine. I close MS Visual C# to go off and do other things in life.

I reopen it and (before doing anything else)

14条回答
  •  -上瘾入骨i
    2020-11-30 08:48

    What I found is that the Program.cs file was not part of the solution. I did an add existing item and added the file (Program.cs) back to the solution.

    This corrected the error: Error 1 Program '..... does not contain a static 'Main' method suitable for an entry point

提交回复
热议问题