Aspnetcore.docs: Migration process from Asp.net core 1.x to 2.1 applications targeting .Net framework

Created on 3 Oct 2018  ·  6Comments  ·  Source: dotnet/AspNetCore.Docs

Can we consider the following as steps to migrate a Asp.net core application from 1.x to 2.1 for applications that target full framework .

  1. Update target framework monikor to target framework > 462
  2. Update .net core sdk version to 2.1.4 in global.json.
  3. In packagereference attribute for all .csproj, for all references that connect to microsoft.aspnetcore.* change the version number to 2.1
    E.g <PackageReference Include=""Microsoft.AspNetCore.Authentication.Cookies" Version="2.1" />

  4. Update the main method of program.cs as per https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/?view=aspnetcore-2.1#update-main-method-in-program.cs

  5. Startup.cs code changes for adding and removing configuration providers as per https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/?view=aspnetcore-2.1#add-configuration-providers
  6. Database initialization code changes as required - https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/?view=aspnetcore-2.1#move-database-initialization-code
  7. Remove references to <DotNetCliToolReference> elements for the following packages. These tools are bundled by default in the .NET Core CLI and don't need to be installed separately.
    Microsoft.DotNet.Watcher.Tools (dotnet watch)
    Microsoft.EntityFrameworkCore.Tools.DotNet (dotnet ef)
    Microsoft.Extensions.Caching.SqlConfig.Tools (dotnet sql-cache)
    Microsoft.Extensions.SecretManager.Tools (dotnet user-secrets)

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

P2

Most helpful comment

@Rick-Anderson We don't currently have a doc that focuses on 1.x to 2.1 migration. Customers should be able to get what they need for this by reading the 1.0 to 2.0 and 2.0 to 2.1 docs. We've tried to cover both .NET Core and .NET Framework.

All 6 comments

If the above steps are good, then can we create a new documentation article for applications targeting full framework that want to migrate from .net core 1.x to 2.1

@scottaddie where would this information go? In Migrate from ASP.NET Core 1.x to 2.0

@Rick-Anderson We don't currently have a doc that focuses on 1.x to 2.1 migration. Customers should be able to get what they need for this by reading the 1.0 to 2.0 and 2.0 to 2.1 docs. We've tried to cover both .NET Core and .NET Framework.

@scottaddie sounds great. Get @srini1978 to review your changes or let @srini1978 make that change.

@scottaddie @Rick-Anderson . The reason a separate documentation article would be useful is because many customers are using .net core only on LTS versions. Recently the LTS moved from .net 1.1 to .net 2.1 and hence an article talking about Asp.net core 1.x LTS to Asp.net core 2.1 LTS would gather more reads and also relevance for these customers.

Thanks for contacting us.
We don’t have the resources to invest in this area, so we are closing the issue. Should your request generate enough 👍 responses, we’ll reconsider.

Was this page helpful?
0 / 5 - 0 ratings