In .NET Core we build application using command line tool called dotnet command.Though we can use visual studio directly without using this command but dotnet CLI command in quite useful.
Building a Console App
The dotnet command-line tool can be used for creating different types of applications.It has one option that will create a simple console application.
To see all the templates you can use with it you use dotnet new without any parameters.
Create a new console application from CLI dotnet command
Following will create a console application in the current directory.Note as that this will create project files in the current directory so change to the directory where you want to create the project.
go to windows command prompt.execute the following command:
required folders and files are created after the above command executes:
Target framework version
You can check the target framework version of the newly created application by looking at the TargetFramework element of the .csproj file.
Running the console application
You can run the above console application using the following command: