Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared framework clarification #12134

Merged
merged 2 commits into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aspnetcore/fundamentals/metapackage-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ The [Microsoft.AspNetCore.App](https://www.nuget.org/packages/Microsoft.AspNetCo

All the features of ASP.NET Core 2.1 and later and Entity Framework Core 2.1 and later are included in the `Microsoft.AspNetCore.App` package. The default project templates targeting ASP.NET Core 2.1 and later use this package. We recommend applications targeting ASP.NET Core 2.1 and later and Entity Framework Core 2.1 and later use the `Microsoft.AspNetCore.App` package.

The version number of the `Microsoft.AspNetCore.App` metapackage represents the ASP.NET Core version and Entity Framework Core version.
The version number of the `Microsoft.AspNetCore.App` metapackage represents the minimum ASP.NET Core version and Entity Framework Core version.

Using the `Microsoft.AspNetCore.App` metapackage provides version restrictions that protect your app:

* If a package is included that has a transitive (not direct) dependency on a package in `Microsoft.AspNetCore.App`, and those version numbers differ, NuGet will generate an error.
* Other packages added to your app cannot change the version of packages included in `Microsoft.AspNetCore.App`.
* Version consistency ensures a reliable experience. `Microsoft.AspNetCore.App` was designed to prevent untested version combinations of related bits being used together in the same app.

Applications that use the `Microsoft.AspNetCore.App` metapackage automatically take advantage of the ASP.NET Core shared framework. When you use the `Microsoft.AspNetCore.App` metapackage, **no** assets from the referenced ASP.NET Core NuGet packages are deployed with the application—the ASP.NET Core shared framework contains these assets. The assets in the shared framework are precompiled to improve application startup time. For more information, see "shared framework" in [.NET Core distribution packaging](/dotnet/core/build/distribution-packaging).
Applications that use the `Microsoft.AspNetCore.App` metapackage automatically take advantage of the ASP.NET Core shared framework. When you use the `Microsoft.AspNetCore.App` metapackage, **no** assets from the referenced ASP.NET Core NuGet packages are deployed with the application—the ASP.NET Core shared framework contains these assets. The assets in the shared framework are precompiled to improve application startup time. For more information, see [The shared framework](https://natemcmaster.com/blog/2018/08/29/netcore-primitives-2/).

The following project file references the `Microsoft.AspNetCore.App` metapackage for ASP.NET Core and represents a typical ASP.NET Core 2.1 template:

Expand Down
10 changes: 4 additions & 6 deletions aspnetcore/fundamentals/metapackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ uid: fundamentals/metapackage

This feature requires ASP.NET Core 2.x targeting .NET Core 2.x.

The [Microsoft.AspNetCore.All](https://www.nuget.org/packages/Microsoft.AspNetCore.All) metapackage for ASP.NET Core includes:
[Microsoft.AspNetCore.All](https://www.nuget.org/packages/Microsoft.AspNetCore.All) is a metapackage that refers to a shared framework. A *shared framework* is a set of assemblies (*.dll* files) that are not in the app's folders. The shared framework must be installed on the machine to run the app. For more information, see [The shared framework](https://natemcmaster.com/blog/2018/08/29/netcore-primitives-2/).

The shared framework that `Microsoft.AspNetCore.All` refers to includes:

* All supported packages by the ASP.NET Core team.
* All supported packages by the Entity Framework Core.
* Internal and 3rd-party dependencies used by ASP.NET Core and Entity Framework Core.

All the features of ASP.NET Core 2.x and Entity Framework Core 2.x are included in the `Microsoft.AspNetCore.All` package. The default project templates targeting ASP.NET Core 2.0 use this package.

The version number of the `Microsoft.AspNetCore.All` metapackage represents the ASP.NET Core version and Entity Framework Core version.

Applications that use the `Microsoft.AspNetCore.All` metapackage automatically take advantage of the [.NET Core Runtime Store](/dotnet/core/deploying/runtime-store). The Runtime Store contains all the runtime assets needed to run ASP.NET Core 2.x applications. When you use the `Microsoft.AspNetCore.All` metapackage, **no** assets from the referenced ASP.NET Core NuGet packages are deployed with the application — the .NET Core Runtime Store contains these assets. The assets in the Runtime Store are precompiled to improve application startup time.

You can use the package trimming process to remove packages that you don't use. Trimmed packages are excluded in published application output.
The version number of the `Microsoft.AspNetCore.All` metapackage represents the minimum ASP.NET Core version and Entity Framework Core version.

The following *.csproj* file references the `Microsoft.AspNetCore.All` metapackage for ASP.NET Core:

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/host-and-deploy/iis/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The worker process fails. The app doesn't start.

The ASP.NET Core Module attempts to start the backend dotnet process but it fails to start. The cause of a process startup failure can usually be determined from entries in the [Application Event Log](#application-event-log) and the [ASP.NET Core Module stdout log](#aspnet-core-module-stdout-log).

A common failure condition is the app is misconfigured due to targeting a version of the ASP.NET Core shared framework that isn't present. Check which versions of the ASP.NET Core shared framework are installed on the target machine.
A common failure condition is the app is misconfigured due to targeting a version of the ASP.NET Core shared framework that isn't present. Check which versions of the ASP.NET Core shared framework are installed on the target machine. The *shared framework* is the set of assemblies (*.dll* files) that are installed on the machine and referenced by a metapackage such as `Microsoft.AspNetCore.App`. The metapackage reference can specify a minimum required version. For more information, see [The shared framework](https://natemcmaster.com/blog/2018/08/29/netcore-primitives-2/).

The *502.5 Process Failure* error page is returned when a hosting or app misconfiguration causes the worker process to fail:

Expand Down
3 changes: 2 additions & 1 deletion aspnetcore/migration/20_21.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ The following markup shows the template-generated 2.1 project file:

## Rules for projects targeting the shared framework

A *shared framework* is a set of assemblies (*.dll* files) that are not in the app's folders. The shared framework must be installed on the machine to run the app. For more information, see [The shared framework](https://natemcmaster.com/blog/2018/08/29/netcore-primitives-2/).
ASP.NET Core 2.1 includes the following shared frameworks:

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

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.

Known issues for projects targeting the shared framework:
Known issues for projects targeting a shared framework:

* 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).
* 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`.
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/migration/22-to-30.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This article explains how to update an existing ASP.NET Core 2.2 project to ASP.

* Update the `Version` on remaining `<PackageReference>` elements for `Microsoft.AspNetCore.*` packages to the current preview (for example, `3.0.0-preview-18579-0053`).

If there's no 3.0 version of a package, the package might have been deprecated in 3.0. Many of these are part of `Microsoft.AspNetCore.App` and shouldn't be referenced individually. For a preliminary list of packages no longer produced in 3.0, see [Stop producing packages for shared framework assemblies in 3.0 (aspnet/AspNetCore #3756)](https://github.com/aspnet/AspNetCore/issues/3756).
If there's no 3.0 version of a package, the package might have been deprecated in 3.0. Many of these are part of `Microsoft.AspNetCore.App` and shouldn't be referenced individually. For a preliminary list of packages no longer produced in 3.0, see [Stop producing packages for shared framework assemblies in 3.0 (aspnet/AspNetCore #3756)](https://github.com/aspnet/AspNetCore/issues/3756). The *shared framework* is the set of assemblies (*.dll* files) that are installed on the machine and referenced by `Microsoft.AspNetCore.App`. For more information, see [The shared framework](https://natemcmaster.com/blog/2018/08/29/netcore-primitives-2/).

* Some assemblies were removed from `Microsoft.AspNetCore.App` between 2.x and 3.0. You may need to add `<PackageReference>` items if you're using APIs from packages listed in [Assemblies being removed from Microsoft.AspNetCore.App 3.0 (aspnet/AspNetCore #3755)](https://github.com/aspnet/AspNetCore/issues/3755).

Expand Down