I'm Calin Baenen – AKA KattyTheEnby – a programmer born October 30th, 2006.
I love programming, it has been my passion since I was a kid, and will forever be my passion.
Hi! I'm an aspiring computer scientist with interests in quantum computing and distributed systems. In this blog, I write about the useful things I've learned during my programming journey.
Doing dotnet new console creates a new “console” project in the current directory.
It creates two files - a .csproj and a Program.cs file. The Program.cs file contains your code (you can add as many extra cs files as you want). The .csproj file contains information that helps the compiler understand how to build (aka compile) your project. For example, what libraries to use, what framework to build it for, whether to ignore certain warnings etc. The obj/ folder can be ignored.
In that project directory, you can use the command dotnet run to run your project. Alternatively, you can do dotnet build to compile it, and then you can manually click the exe in the bin folder.
It is worth installing visual studio, as it provides a nice interface to manage all this stuff.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Can you explain what exactly this does?
I really don't understand, and I can't see why there isn't a
dotnet compile <file)s)>.Thanks for your help.
Cheers.
Doing
dotnet new consolecreates a new “console” project in the current directory.It creates two files - a
.csprojand aProgram.csfile. TheProgram.csfile contains your code (you can add as many extra cs files as you want). The.csprojfile contains information that helps the compiler understand how to build (aka compile) your project. For example, what libraries to use, what framework to build it for, whether to ignore certain warnings etc. Theobj/folder can be ignored.In that project directory, you can use the command
dotnet runto run your project. Alternatively, you can dodotnet buildto compile it, and then you can manually click the exe in thebinfolder.It is worth installing visual studio, as it provides a nice interface to manage all this stuff.