Migrate ASP.Net core from 5.0 to 6.0

Michelle Hung
1 min readDec 18, 2021

I try to migrate my web api project from .Net5 to .Net6, using VsCode editor.

Migrate .Net Core project

1. Download and install .net6 SDK from Microsoft website

2. Modify TargetFramework from 5.x.x to 6.0.0 in .csproj file

csproj file

3. Update relative Nuget package to 6.0 with command dotnet add <package name> --version <version>

4. Build project and run test

Update images

If you are using docker, then also need to update Dockerfile and images. Follow below:

1. Modify tags in Dockerfile

docker file

2. Build project with docker build and run project with docker run to verify

Sign up to discover human stories that deepen your understanding of the world.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response