Migrate from .NET Core 2.0 to 2.1
This article shows you the basic steps for migrating your .NET Core 2.0 app to 2.1. If you're looking to migrate your ASP.NET Core app to 2.1, see Migrate from ASP.NET Core 2.0 to 2.1.
For an overview of the new features in .NET Core 2.1, see What's new in .NET Core 2.1.
Update the project file to use 2.1 versions
Open the project file (the *.csproj, *.vbproj, or *.fsproj file).
Change the target framework value from
netcoreapp2.1. The target framework is defined by the
For example, change
<DotNetCliToolReference>references for tools that are bundled in the .NET Core 2.1 SDK (v 2.1.300 or later). These references include:
- dotnet-watch (Microsoft.DotNet.Watcher.Tools)
- dotnet-user-secrets (Microsoft.Extensions.SecretManager.Tools)
- dotnet-sql-cache (Microsoft.Extensions.Caching.SqlConfig.Tools)
- dotnet-ef (Microsoft.EntityFrameworkCore.Tools.DotNet)
In previous .NET Core SDK versions, the reference to one of these tools in your project file looks similar to the following example:
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
Since this entry isn't used by the the .NET Core SDK any longer, you'll see a warning similar to the following if you still have references to one of these bundled tools in your project:
The tool 'Microsoft.EntityFrameworkCore.Tools.DotNet' is now included in the .NET Core SDK. Here is information on resolving this warning.
<DotNetCliToolReference>references for those tools from your project file fixes this issue.