Back to: ASP.NET Core Tutorials For Beginners and Professionals
Creating ASP.NET Core 3.1 Web Application using Visual Studio
In this article, I am going to discuss How to Create the ASP.NET Core Web Application step by step from scratch using Visual Studio 2019 and ASP.NET Core 3.1. Please, read our previous article before proceeding to this article, where we discussed ASP.NET Core Environment Setup. In this article, I am going to use Visual Studio 2019 and ASP.NET Framework 3.1.
Creating the First ASP.NET Core Web Application using Visual Studio 2019 and ASP.NET Core 3.1
To create a new ASP.NET Core Project using ASP.NET Core 3.1, open Visual Studio 2019. And then click on the Create a new project box as shown in the below image.
Once you click on the Create a new project box, it will open the “Create a new project” window. This window includes different .NET Core 3.1 application templates. Here we will create a simple web application, so select the ASP.NET Core Web Application template and click on the Next button as shown in the below image.
Once you click on the Next button, it will open the following Configure Your New Project window. Here, you need to give an appropriate name for your project, set the location where you want to create this project, and the solution name for the ASP.NET Core Web application. In this example, we will give the name “FirstCoreWebApplication” and click on the Create button, as shown in the image below.
Once you click on the Create button, it will open the Create a new ASP.NET Core Web Application as shown below. Here, you need to select the appropriate ASP.NET Core Web application template such as Empty, API, Web Application, Web Application (MVC), Angular, etc. Here in this demo, we are going to use the Empty template so that you will understand how the different components fit together to develop an ASP.NET Core application. Also, make sure that you have selected the appropriate .NET Core and ASP.NET Core versions (latest 3.1). Make sure to uncheck all the checkboxes from the Advanced section and finally click on the Create button, as shown in the below image.
Once you click on the Create button, it will create a new ASP.NET Core Web Application in Visual Studio 2019 using ASP.NET Core 3.1 Framework. Wait for some time till Visual Studio restores the packages in the project. The restoring process means Visual Studio will automatically add, update or delete configured dependencies as NuGet packages in the project. The project will be created with the following file and folder structure in Visual Studio 2019.
Run the ASP.NET Core Application:
To run this web application, click on IIS Express or press F5 (with Debug) or Ctrl + F5 (without Debug). This will open the browser and display the following output.
Here, the output “Hello World!” comes from the Configure method of the Startup class, which is present inside the Startup.cs file Open Startup.cs file and then change the “Hello World!” string to something else and rerun the application, and it will change the output accordingly.
In the next article, I am going to discuss How to Create ASP.NET Core Web Application using Visual Studio 2022 and .NET 6. In this article, I explain How to Create the ASP.NET Core Web Application using Visual Studio step by step using the different types of templates from scratch. I would like to have your feedback. Please post your feedback, question, or comments about this article.
About the Author: Pranaya Rout
Pranaya Rout has published more than 3,000 articles in his 11-year career. Pranaya Rout has very good experience with Microsoft Technologies, Including C#, VB, ASP.NET MVC, ASP.NET Web API, EF, EF Core, ADO.NET, LINQ, SQL Server, MYSQL, Oracle, ASP.NET Core, Cloud Computing, Microservices, Design Patterns and still learning new technologies.
Simple and Easy learn. Thank you
Thank you for such a simple and easy explaination. I would recommend this tutorial to everyone
simpler and faster way to learn .. thanks for sharing …
RAS
very easy to understand topics.
do u have video tutorial pls share link
nice article,thanks a lot
Nice article.. keep it
very impressive and fruitful! Thank you.
Awesome bro. I really appreciated.
It’s very simple and easy to understand,
Thank you so much
Nicely composed article.
Its simple and easy composition makes it easy to follow.
Thanks Man.
Hi.
Can this page update its pictures to the latest version on VS 2019 ?
Regards
Your English is so simple!
Because I already have a React project, it was necessary to download Node.js.
When firing the app up, it failed. Likely because it’s not an Empty project.
I’ll comment if later on, something more related to React comes up and it doesn’t work.
However, it’s a great module. I’m sure the rest of these articles will build one on the next. Hopefully, I can learn to make the React work along the way.
Very Informative site. Good Thing is, it covers every detail of the subject(in Text & Image form) which can cater to both beginner and advance level professionals.
THANKS FOR YOUR EFFORTS, APPRECIATED.
Interesting tutorial, but the procedure shown here no longer seems to correspond to VS2022.
“ASP.Net Core Web App” does not offer an empty template but creates a template with
-Connected Services
-Dependencies
-Properties
-wwwroot (apparently new)
-pages (apparently new)
-appsettings.json
-Program.cs
An empty template only works with “ASP.Net Web (.Net Framework)”
yes, right.