I love IDEs but normally you don’t get to learn a lot of things about internals if you use the IDE. How about creating a .NET project using notepad? Sounds interesting….
Yes, let’s create our first .NET Core project using Command-Line Interface tools without any IDE.
Open the Command Prompt and navigate to the folder path where you would like to create the new .NET Core project.
Create a new folder named “NETCore”.
Create a new folder named “FirstCoreApp” and navigate to the folder
Type “dotnet new”
You can see the C# project got created successfully with 2 files. Program.cs and Project.json Note: Project.json will be seen only if you have .NET Core Tools preview 2 and below. From .NET Core Tools preview 3 onwards you will see FirstCoreApp.csproj file.
Program.cs file contents will be similar to the contents when creating a console application using the VS IDE
You can build the application at command line using the command “dotnet restore”
You can then run the application using the command “dotnet run”
Now we have successfully created a .NET Core application just using Command Line Tools without any IDE.