Skip to content

updated netstandard version #1169

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

Merged
merged 1 commit into from
Oct 31, 2016
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
3 changes: 2 additions & 1 deletion docs/core/migrating-from-dnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Migrating from DNX to .NET Core CLI
description: Migrating from DNX to .NET Core CLI
keywords: .NET, .NET Core
author: blackdwarf
ms.author: mairaw
manager: wpickett
ms.date: 06/20/2016
ms.topic: article
Expand Down Expand Up @@ -160,7 +161,7 @@ and the changes that the new [.NET Standard Library](https://github.com/dotnet/c
brought, the framework needs to be one of the following:

1. `netcoreapp1.0` - if you are writing applications on .NET Core (including ASP.NET Core applications)
2. `netstandard1.5` - if you are writing class libraries for .NET Core
2. `netstandard1.6` - if you are writing class libraries for .NET Core

If you are using other `dnx` targets, like `dnx451` you will need to change those as well. `dnx451` should be changed to `net451`.
Please refer to the [.NET Standard Library document](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md)
Expand Down
21 changes: 11 additions & 10 deletions docs/core/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Packages, Metapackages and Frameworks
description: Packages, Metapackages and Frameworks
keywords: .NET, .NET Core
author: richlander
ms.author: mairaw
manager: wpickett
ms.date: 06/20/2016
ms.topic: article
Expand Down Expand Up @@ -49,7 +50,7 @@ Packages are referenced in project.json. In the example below, the [System.Runti
"System.Runtime": "4.1.0"
},
"frameworks": {
"netstandard1.5": {}
"netstandard1.6": {}
}
}
```
Expand Down Expand Up @@ -87,10 +88,10 @@ In the following example, the `NETStandard.Library` meta package is referenced,
```json
{
"dependencies": {
"NETStandard.Library": "1.5.0"
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.5": {}
"netstandard1.6": {}
}
}
```
Expand Down Expand Up @@ -147,15 +148,15 @@ The .NET Standard (TFM: `netstandard`) framework represents the APIs defined by

The `NETStandard.Library` metapackage targets the `netstandard` framework. The most common way to target `netstandard` is by referencing this metapackage. It describes and provides access to the ~40 .NET libraries and associated APIs that define the .NET Standard Library. You can reference additional packages that target `netstandard` to get access to additional APIs.

A given [NETStandard.Library version](versions/index.md) matches the highest `netstandard` version it exposed (via its closure). The framework reference in project.json is used to select the correct assets from the underlying packages. In this case, `netstandard1.5` assets are required, as opposed to `netstandard1.4` or `net46`, for example.
A given [NETStandard.Library version](versions/index.md) matches the highest `netstandard` version it exposed (via its closure). The framework reference in project.json is used to select the correct assets from the underlying packages. In this case, `netstandard1.6` assets are required, as opposed to `netstandard1.4` or `net46`, for example.

```json
{
"dependencies": {
"NETStandard.Library": "1.5.0"
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.5": {}
"netstandard1.6": {}
}
}
```
Expand All @@ -165,22 +166,22 @@ The framework and metapackage references in project.json do not need to match. F
```json
{
"dependencies": {
"NETStandard.Library": "1.5.0"
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.3": {}
}
}
```

It may seem strange to target `netstandard1.3` but use the 1.5.0 version of `NETStandard.Library`. It is a valid use-case, since the metapackage maintains support for older `netstandard` versions. It could be the case you've standardized on the 1.5.0 version of the metapackage and use it for all your libraries, which target a variety of `netstandard` versions. With this approach, you only need to restore `NETStandard.Library` 1.5.0 and not earlier versions.
It may seem strange to target `netstandard1.3` but use the 1.6.0 version of `NETStandard.Library`. It is a valid use-case, since the metapackage maintains support for older `netstandard` versions. It could be the case you've standardized on the 1.6.0 version of the metapackage and use it for all your libraries, which target a variety of `netstandard` versions. With this approach, you only need to restore `NETStandard.Library` 1.6.0 and not earlier versions.

The reverse would not be valid: targeting `netstandard1.5` with the 1.3.0 version of `NETStandard.Library`. You cannot target a higher framework with a lower metapackage, since the lower version metapackage will not expose any assets for that higher framework. The [versioning scheme] for metapackages asserts that metapackages match the highest version of the framework they describe. By virtue of the versioning scheme, the first version of `NETStandard.Library` is v1.5.0 given that it contains `netstandard1.5` assets. v1.3.0 is used in the example above, for symmetry with the example above, but does not actually exist.
The reverse would not be valid: targeting `netstandard1.6` with the 1.3.0 version of `NETStandard.Library`. You cannot target a higher framework with a lower metapackage, since the lower version metapackage will not expose any assets for that higher framework. The [versioning scheme] for metapackages asserts that metapackages match the highest version of the framework they describe. By virtue of the versioning scheme, the first version of `NETStandard.Library` is v1.6.0 given that it contains `netstandard1.6` assets. v1.3.0 is used in the example above, for symmetry with the example above, but does not actually exist.

### .NET Core Application

The .NET Core Application (TFM: `netcoreapp`) framework represents the packages and associated APIs that come with the .NET Core distribution and the console application model that it provides. .NET Core apps must use this framework, due to targeting the console application model, as should libraries that intended to run only on .NET Core. Using this framework restricts apps and libraries to running only on .NET Core.

The `Microsoft.NETCore.App` metapackage targets the `netcoreapp` framework. It provides access to ~60 libraries, ~40 provided by the `NETStandard.Library` package and ~20 more in addition. You can reference additional libraries that target `netcoreapp` or compatible frameworks, such as `netstandard`, to get access to additional APIs.

Most of the additional libraries provided by `Microsoft.NETCore.App` also target `netstandard` given that their dependencies are satisfied by other `netstandard` libraries. That means that `netstandard` libraries can also reference those packages as dependencies.
Most of the additional libraries provided by `Microsoft.NETCore.App` also target `netstandard` given that their dependencies are satisfied by other `netstandard` libraries. That means that `netstandard` libraries can also reference those packages as dependencies.