Skip to content

Commit db618cf

Browse files
natemcmasterRick Anderson
authored and
Rick Anderson
committed
Update the 2.1 migration doc to instruct users to remove the version on Microsoft.AspNetCore.App (#8715)
Reverts #7543 See dotnet/aspnetcore#3292 (comment) for context
1 parent 7c2f75b commit db618cf

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

aspnetcore/migration/20_21.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Migrate from ASP.NET Core 2.0 to 2.1
33
author: rick-anderson
44
description: This article covers the basics of migrating an ASP.NET Core 2.0 app to 2.1.
55
ms.author: riande
6-
ms.date: 08/14/2018
6+
ms.date: 09/26/2018
77
uid: migration/20_21
88
---
99
# Migrate from ASP.NET Core 2.0 to 2.1
@@ -31,9 +31,9 @@ This article provides an overview on migration to ASP.NET Core 2.1. It doesn't c
3131
Update the project file:
3232

3333
* Change the target framework to .NET Core 2.1 by updating the project file to `<TargetFramework>netcoreapp2.1</TargetFramework>`.
34-
* Replace the package reference for `Microsoft.AspNetCore.All` with a package reference for `Microsoft.AspNetCore.App`. You may need to add dependencies that were removed from `Microsoft.AspNetCore.All`. For more information, see <xref:fundamentals/metapackage#migrate> and <xref:fundamentals/metapackage-app>. For apps that target the .NET Framework:
35-
* Add individual package references instead of a metapackage reference.
36-
* Update each package reference to 2.1.
34+
* Replace the package reference for `Microsoft.AspNetCore.All` with a package reference for `Microsoft.AspNetCore.App`. You may need to add dependencies that were removed from `Microsoft.AspNetCore.All`. For more information, see <xref:fundamentals/metapackage#migrate> and <xref:fundamentals/metapackage-app>.
35+
* Remove the "Version" attribute on the package reference to `Microsoft.AspNetCore.App`. Projects which use `<Project Sdk="Microsoft.NET.Sdk.Web">` do not need to set the version. The version will be implied by the target framework and selected to best match the way ASP.NET Core 2.1 works. (See below for more information.)
36+
* For apps that target the .NET Framework, update each package reference to 2.1.
3737
* Remove references to **&lt;DotNetCliToolReference&gt;** elements for the following packages. These tools are bundled by default in the .NET Core CLI and don't need to be installed separately.
3838
* Microsoft.DotNet.Watcher.Tools (`dotnet watch`)
3939
* Microsoft.EntityFrameworkCore.Tools.DotNet (`dotnet ef`)
@@ -50,25 +50,25 @@ The following markup shows the template-generated 2.1 project file:
5050

5151
[!code-xml[Main](20_21/sample/WebApp21.csproj)]
5252

53-
## Rules for projects targeting the shared runtime
53+
## Rules for projects targeting the shared framework
5454

55-
ASP.NET Core includes the following shared runtimes:
55+
ASP.NET Core 2.1 includes the following shared frameworks:
5656

5757
* [Microsoft.AspNetCore.App](xref:fundamentals/metapackage-app)
5858
* [Microsoft.AspNetCore.All](xref:fundamentals/metapackage)
5959

6060
The version specified by the package reference is the *minimum required* version. For example, a project referencing the 2.1.1 versions of these packages won't run on a machine with only the 2.1.0 runtime installed.
6161

62-
Known issues for projects targeting the shared runtime:
62+
Known issues for projects targeting the shared framework:
6363

64-
* Using `Microsoft.AspNetCore.App` 2.1.0 with Entity Framework Core 2.1.1 causes NuGet restore failures due to package conflicts. The recommended solution is to upgrade `Microsoft.AspNetCore.App` to 2.1.1. For more information, see [Packages that share dependencies with Microsoft.AspNetCore.App cannot reference patch versions](https://github.com/aspnet/Universe/issues/1180).
64+
* The .NET Core 2.1.300 SDK (first included in Visual Studio 15.6) set the implicit version of `Microsoft.AspNetCore.App` to 2.1.0 which caused conflicts with Entity Framework Core 2.1.1. The recommended solution is to upgrade the .NET Core SDK to 2.1.301 or later. For more information, see [Packages that share dependencies with Microsoft.AspNetCore.App cannot reference patch versions](https://github.com/aspnet/Universe/issues/1180).
6565
* All projects that must use `Microsoft.AspNetCore.All` or `Microsoft.AspNetCore.App` should add a package reference for the package in the project file, even if they contain a project reference to another project using `Microsoft.AspNetCore.All` or `Microsoft.AspNetCore.App`.
6666

6767
Example:
6868

6969
* `MyApp` has a package reference to `Microsoft.AspNetCore.App`.
7070
* `MyApp.Tests` has a project reference to `MyApp.csproj`.
71-
71+
7272
Add a package reference for `Microsoft.AspNetCore.App` to `MyApp.Tests`. For more information, see [Integration testing is hard to set up and may break on shared framework servicing](https://github.com/aspnet/Home/issues/3156).
7373

7474
## Update to the 2.1 Docker images

aspnetcore/migration/20_21/sample/WebApp21.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.4" />
9+
<PackageReference Include="Microsoft.AspNetCore.App" />
1010
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" PrivateAssets="All" />
1111
</ItemGroup>
1212

0 commit comments

Comments
 (0)