We'll straight away jump to installing the ASP.NET Core NuGet package in your application.
Follow these steps to install the NuGet package of ASP.NET MVC:
- Right-click on the dependencies, and select the Manage NuGet Packages option:
- We will see that a package called Microsoft.ASPNetCore.All is installed (as shown in the following screenshot). This package is actually a meta package that installs most of the dependencies we need.
- If we extend this package from dependencies, we will see:
So, everything we need is already installed regardless of using an empty project or not.
ASP.NET Core is installed in our application. Now, we need to tell our application to use ASP.NET MVC.
This needs a couple of changes to the Startup.cs file:
- Configure the application to add the MVC service. This can be done by adding...