So even a 10 line hello world program will be within a project within a solution. A solution may consist of one or more projects. A project may be one file or a multitude.
A solution implies a .sln file, which has its own syntax. A project seems to be managed by a .csproj file (in the case of C#), which is XML.Whether these files should be "hands off" and left solely to visual studio to manage is unknown to me. In fact this whole business demands further study.
You can so a "dotnet build" from the command line, but it expects to find a .csproj file and a .sln file to guide what it does.
Tom's Computer Info / tom@mmto.org