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.
Doing
dotnet new console
creates a new “console” project in the current directory.It creates two files - a
.csproj
and aProgram.cs
file. TheProgram.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. Theobj/
folder can be ignored.In that project directory, you can use the command
dotnet run
to run your project. Alternatively, you can dodotnet build
to compile it, and then you can manually click the exe in thebin
folder.It is worth installing visual studio, as it provides a nice interface to manage all this stuff.