Skip to content

Migration process from Asp.net core 1.x to 2.1 applications targeting .Net framework #8822

@srini1978

Description

@srini1978

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.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions