In this post, we take a look at How to Create New Project in ASP.Net Core. For now I am making use of the .NET core framework 8. You can use the modern version if you are reading this in near future. You should check out the official framework website here.
Once you setup the framework, you can create project specific to the C#, Blazor, ASP and the razor pages too. So it all depends on which type of the project that you wish to do and which final output you wish to get.
I assume you want to create new project in ASP.Net core. You should check out video below.
I assume you have dotnet framework installed you can verify the same on the command prompt. Type in the following code.
dotnet --info
This should bring in the display as shown below.
Now type in the command below.
dotnet new webapp -o MyApp --no-https -f net7.0
This command would create the MyApp which would make use of the framework 7, if you want to use the latest framework, make such adjustment.
Now that you have created such project, CD into such folder.
cd MyApp
and then make sure to type in the below command.
dotnet watch
Now this would open up the browser which would be Edge in your case. And then use the browsers localhost:5055 route to access the new web project in the ASP.Net core. It would look something like this.
You can also check out the Visual Studio explanation of the same tutorial in the video above. It'd give you an idea on how the project through the Visual Studio and the command line. It'd be fun to check it out but it's kind of good to start with either command line or the visual studio.
In short the tutorial here should help you get started with the ASP.Net. And this would be a good thing for you to work with. I have realized that if you manage to make the most out of the projects using the visual studio it can save you some time. So in that context I'd prefer to have ASP.Net on visual studio instead of command line.