Skip to content

Migrate Dotnet Core 3.1 to DotNet 6.0ΒΆ

If used global.json, update the versionΒΆ

JSON
{
  "sdk": {
-    "version": "3.1.200"
+    "version": "6.0.100"
  }
}

Update csproj file withΒΆ

Text Only
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
-    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <TargetFramework>net6.0</TargetFramework>
  </PropertyGroup>

</Project>

Update all nuget packageΒΆ

  • Install dotnet-outdated-tools from nuget repo
    Python
    dotnet tool install --global dotnet-outdated-tool --version 4.2.0
    
  • Run update command to update all the packages
    Python
    dotnet-outdated --upgrade
    
    The command will automatically update all the package.