Step-by-step guide

Here is a practical guide on migrating a project from ASP.NET MVC framework to ASP.NET Core. Step-by-step instruction written by the team of nopCommerce open-source project can be easily applied to any ASP.NET MVC project.
It also describes why you might need to upgrade, and why projects that do not yet keep up with pace should consider it.

Why porting to ASP.NET Core?

Before proceeding to the steps of porting from ASP.NET MVC to ASP.NET Core (using nopCommerce as an example), let's take the quick overview of this framework advantages.
ASP.NET Core is already a fairly well-known and developed framework with several major updates making it quite stable, technologically advanced and resistant to XSRF/CSRF attacks.
Cross-platform is one of the distinguishing features making it more and more popular. From now on, your web application can run both in Windows and Unix environment. 
Modular architecture - ASP.NET Core comes fully in the form of NuGet packages, it allows optimizing the application, including the selected required packages. This improves solution performance and reduces the time it takes to upgrade separate parts.
This is the second important characteristic that allows developers to integrate new features into their solution more flexible.
Performance is another step towards building a high-performance application. ASP.NET Core handles 2.300% more requests per second than ASP.NET 4.6, and 800% more requests per second than node.js.
You can check the detailed performance tests yourself here or here.
Best plaintext responses per second, Test environment

Middleware is a new light and fast modular pipeline for in-app requests. Each part of middleware processes an HTTP request, and then either decides to return the result or passes the next part of middleware.
This approach gives the developer full control over the HTTP pipeline and contributes to the development of simple modules for the application, which is important for a growing open-source project.
Also, ASP.NET Core MVC provides features that simplify web development. nopCommerce already used some of them, such as the Model-View-Controller template, Razor syntax, model binding, and validation. Among the new features are:
Of course, ASP.NET Core has much more features, we viewed the most interesting ones only.
Now let's consider the points to keep in mind when porting your app to a new framework. 


Migration

The following descriptions contains large amount of links to the official ASP.NET Core documentation to give more detailed information about the topic and guide developers who face such a task the first time.
Step 1. Preparing a toolkit
The first thing you need is to upgrade Visual Studio 2017 to version 15.3 or later and install the latest version of .NET Core SDK.
Before porting, we advise to use .Net Portability Analyzer. This can be a good starting point to understand how labor-intensive porting from one platform to another will be. Nevertheless, this tool does not cover all the issues, this process has many pitfalls to be solved as they emerge.
Below we will describe the main steps and the solutions used in nopCommerce project.
The first and the easiest thing to do is to update links to the libraries used in the project so to they support .NET Standard.
Step 2. NuGet package compatibility analysis to support .Net standard 
If you use NuGet packages in your project, check whether they are compatible with .NET Core. One way to do this is to use the NuGetPackageExplorer tool. 
Step 3. The new format of csproj file in .NET Core  
A new approach for adding references to third-party packages was introduced in .NET Core. When adding a new class library, you need to open the main project file and replace its contents as follows:
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>   
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.6" />
    ...
  </ItemGroup>
  ...
</Project>
References to the connected libraries will be loaded automatically.
For more information on comparing the project.json and CSPROJ properties, read the official documentation here and here.
Step 4. Namespace update
Delete all uses of System.Web and replace them with Microsoft.AspNetCore.
Step 5. Configure the Startup.cs file instead of using global.asax 
ASP.NET Core has a new way of loading the app. The app entry point is
Startup
, and there is no dependency on the Global.asax file.
Startup
registers the middlewares in the app.
Startup
must include the
Configure
method. The required middleware should be added to the pipeline in
Configure
.
Issues to solve in Startup.cs:
  1. Configuring middleware for MVC and WebAPI requests
  2. Configuring for: