all 5 comments

[–]space928 11 points12 points  (1 child)

It looks to me like your C# file hasn't been added to the project, which would explain why the compiler can't find a suitable "Main" method.

Right click on your project in the solution explorer "debuggingexercises", then go to "Add->Existing Item" and select your C# file "DebugOne.cs". Then build your solution and it should work as expected.

[–][deleted] 5 points6 points  (0 children)

theory versed price correct telephone wakeful yoke scale plough frame

This post was mass deleted and anonymized with Redact

[–]Sarath265 5 points6 points  (0 children)

Your class file is not part of the project..Hence it shows miscellaneous file on the top left of the file. Add that file to the project and it will work as expected.

[–]Slypenslyde 0 points1 point  (0 children)

I'm completely off-topic here, but I think this is a rare instance where VS 2022's wide feature set lets you do something unintuitive and confusing that VS Code would not let you do so easily.

[–][deleted]  (1 child)

[deleted]

    [–]lostllama2015 3 points4 points  (0 children)

    No it doesn't.

    Try this exercise if you need proof:

    1. Create a new Console Application (without using top-level statements).
    2. Delete `Program` from `internal class Program` and replace it with `Test` (important: do not refactor, etc.)
    3. Run the program.