Skip to content

Commit

Permalink
Freshen up "updateeachrelease" articles (dotnet#27484)
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren authored Dec 11, 2021
1 parent 40ba97b commit dcbdcb5
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/core/project-sdk/msbuild-props-desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This page is a reference for the MSBuild properties and items that you use to co

To use WinForms or WPF, configure your project file.

### .NET 5+
### .NET 5 and later versions

Specify the following settings in the project file of your WinForms or WPF project:

Expand Down
28 changes: 13 additions & 15 deletions docs/core/tools/global-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: global.json overview
description: Learn how to use the global.json file to set the .NET SDK version when running .NET CLI commands.
ms.topic: how-to
ms.date: 05/01/2020
ms.date: 12/09/2021
ms.custom: "updateeachrelease"
---
# global.json overview
Expand All @@ -11,7 +11,7 @@ ms.custom: "updateeachrelease"

The *global.json* file allows you to define which .NET SDK version is used when you run .NET CLI commands. Selecting the .NET SDK is independent from specifying the runtime your project targets. The .NET SDK version indicates which versions of the .NET CLI is used.

In general, you want to use the latest version of the SDK tools, so no *global.json* file is needed. In some advanced scenarios, you might want to control the version of the SDK tools, and this article explains how to do this.
In general, you want to use the latest version of the SDK tools, so no *global.json* file is needed. In some advanced scenarios, you might want to control the version of the SDK tools, and this article explains how to do that.

For more information about specifying the runtime instead, see [Target frameworks](../../standard/frameworks.md).

Expand All @@ -29,32 +29,28 @@ Specifies information about the .NET SDK to select.

- Type: `string`

- Available since: .NET Core 1.0 SDK.

The version of the .NET SDK to use.

This field:

- Doesn't have wildcard support, that is, the full version number has to be specified.
- Doesn't have wildcard support; that is, you must specify the full version number.
- Doesn't support version ranges.

#### allowPrerelease

- Type: `boolean`

- Available since: .NET Core 3.0 SDK.

Indicates whether the SDK resolver should consider prerelease versions when selecting the SDK version to use.

If you don't set this value explicitly, the default value depends on whether you're running from Visual Studio:

- If you're **not** in Visual Studio, the default value is `true`.
- If you are in Visual Studio, it uses the prerelease status requested. That is, if you're using a Preview version of Visual Studio or you set the **Use previews of the .NET Core SDK** option (under **Tools** > **Options** > **Environment** > **Preview Features**), the default value is `true`; otherwise, `false`.
- If you are in Visual Studio, it uses the prerelease status requested. That is, if you're using a Preview version of Visual Studio or you set the **Use previews of the .NET SDK** option (under **Tools** > **Options** > **Environment** > **Preview Features**), the default value is `true`. Otherwise, the default value is `false`.

#### rollForward

- Type: `string`

- Available since: .NET Core 3.0 SDK.

The roll-forward policy to use when selecting an SDK version, either as a fallback when a specific SDK version is missing or as a directive to use a higher version. A [version](#version) must be specified with a `rollForward` value, unless you're setting it to `latestMajor`.
Expand Down Expand Up @@ -99,7 +95,7 @@ The following example shows how to not use prerelease versions:
}
```

The following example shows how to use the highest version installed that is greater or equal than the specified version. The JSON shown disallows any SDK version earlier than 2.2.200 and allows 2.2.200 or any later version, including 3.0.xxx and 3.1.xxx.
The following example shows how to use the highest version installed that's greater or equal than the specified version. The JSON shown disallows any SDK version earlier than 2.2.200 and allows 2.2.200 or any later version, including 3.0.xxx and 3.1.xxx.

```json
{
Expand Down Expand Up @@ -145,28 +141,28 @@ The following example shows how to use the highest patch version installed of a

## global.json and the .NET CLI

It's helpful to know which SDK versions are installed on your machine to set one in the *global.json* file. For more information on how to do that, see [How to check that .NET is already installed](../install/how-to-detect-installed-versions.md#check-sdk-versions).
To set an SDK version in the *global.json* file, it's helpful to know which SDK versions are installed on your machine. For information on how to do that, see [How to check that .NET is already installed](../install/how-to-detect-installed-versions.md#check-sdk-versions).

To install additional .NET SDK versions on your machine, visit the [Download .NET](https://dotnet.microsoft.com/download/dotnet) page.

You can create a new *global.json* file in the current directory by executing the [dotnet new](dotnet-new.md) command, similar to the following example:

```dotnetcli
dotnet new globaljson --sdk-version 3.0.100
dotnet new globaljson --sdk-version 6.0.100
```

## Matching rules

> [!NOTE]
> The matching rules are governed by the `dotnet.exe` entry point, which is common across all installed .NET installed runtimes. The matching rules for the latest installed version of the .NET Runtime are used when you have multiple runtimes installed side-by-side or if or you're using a *global.json* file.
## [.NET Core 3.x](#tab/netcore3x)
## [.NET Core 3.x and .NET 5+](#tab/netcore3x)

Starting with .NET Core 3.0, the following rules apply when determining which version of the SDK to use:

- If no *global.json* file is found, or *global.json* doesn't specify an SDK version nor an `allowPrerelease` value, the highest installed SDK version is used (equivalent to setting `rollForward` to `latestMajor`). Whether prerelease SDK versions are considered depends on how `dotnet` is being invoked.
- If you're **not** in Visual Studio, prerelease versions are considered.
- If you are in Visual Studio, it uses the prerelease status requested. That is, if you're using a Preview version of Visual Studio or you set the **Use previews of the .NET Core SDK** option (under **Tools** > **Options** > **Environment** > **Preview Features**), prerelease versions are considered; otherwise, only release versions are considered.
- If you are in Visual Studio, it uses the prerelease status requested. That is, if you're using a Preview version of Visual Studio or you set the **Use previews of the .NET SDK** option (under **Tools** > **Options** > **Environment** > **Preview Features**), prerelease versions are considered; otherwise, only release versions are considered.
- If a *global.json* file is found that doesn't specify an SDK version but it specifies an `allowPrerelease` value, the highest installed SDK version is used (equivalent to setting `rollForward` to `latestMajor`). Whether the latest SDK version can be release or prerelease depends on the value of `allowPrerelease`. `true` indicates prerelease versions are considered; `false` indicates that only release versions are considered.
- If a *global.json* file is found and it specifies an SDK version:

Expand Down Expand Up @@ -197,11 +193,13 @@ The **patch version** is defined by the last two digits (`yz`) in the last porti

## Troubleshoot build warnings

* The following warning indicates that your project was compiled using a prerelease version of the .NET Core SDK:
* The following warnings indicate that your project was compiled using a prerelease version of the .NET SDK:

> You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at <https://go.microsoft.com/fwlink/?linkid=869452>.
.NET Core SDK versions have a history and commitment of being high quality. However, if you don't want to use a prerelease version, check the different strategies you can use with the .NET Core 3.0 SDK or a later version in the [allowPrerelease](#allowprerelease) section. For machines that have never had a .NET Core 3.0 or higher Runtime or SDK installed, you need to create a *global.json* file and specify the exact version you want to use.
> You are using a preview version of .NET. See: <https://aka.ms/dotnet-core-preview>
.NET SDK versions have a history and commitment of being high quality. However, if you don't want to use a prerelease version, check the different strategies you can use in the [allowPrerelease](#allowprerelease) section. For machines that have never had a .NET Core 3.0 or higher runtime or SDK installed, you need to create a *global.json* file and specify the exact version you want to use.

* The following warning indicates that your project targets EF Core 1.0 or 1.1, which isn't compatible with .NET Core 2.1 SDK and later versions:

Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/language-reference/includes/langversion-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ms.custom: "updateeachrelease"
| `preview` | The compiler accepts all valid language syntax from the latest preview version. |
| `latest` | The compiler accepts syntax from the latest released version of the compiler (including minor version). |
| `latestMajor` (`default`) | The compiler accepts syntax from the latest released major version of the compiler. |
| `10.0` | The compiler accepts only syntax that is included in C# 10 or lower. |
| `9.0` | The compiler accepts only syntax that is included in C# 9.0 or lower. |
| `10.0` | The compiler accepts only syntax that is included in C# 10 or lower. |
| `9.0` | The compiler accepts only syntax that is included in C# 9 or lower. |
| `8.0` | The compiler accepts only syntax that is included in C# 8.0 or lower. |
| `7.3` | The compiler accepts only syntax that is included in C# 7.3 or lower. |
| `7.2` | The compiler accepts only syntax that is included in C# 7.2 or lower. |
Expand Down
7 changes: 5 additions & 2 deletions docs/csharp/language-reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ The features that have been implemented in C# versions after 6.0 are represented
[C# 8.0 Specification Proposals](~/_csharplang/proposals/csharp-8.0/nullable-reference-types.md)
C# 8.0 is available with .NET Core 3.0. The features include nullable reference types, recursive pattern matching, default interface methods, async streams, ranges and indexes, pattern based using and using declarations, null coalescing assignment, and readonly instance members.

[C# 9.0 Specification Proposals](~/_csharplang/proposals/csharp-9.0/records.md)
C# 9.0 is available with .NET 5. The features include records, top-level statements, pattern matching enhancements, init only setters, target-typed new expressions, module initializers, extending partial methods, static anonymous functions, target-typed conditional expressions, covariant return types, extension GetEnumerator in foreach loops, lambda discard parameters, attributes on local functions, native sized integers, function pointers, suppress emitting localsinit flag, and unconstrained type parameter annotations.
[C# 9 Specification Proposals](~/_csharplang/proposals/csharp-9.0/records.md)
C# 9 is available with .NET 5. The features include records, top-level statements, pattern matching enhancements, init only setters, target-typed new expressions, module initializers, extending partial methods, static anonymous functions, target-typed conditional expressions, covariant return types, extension GetEnumerator in foreach loops, lambda discard parameters, attributes on local functions, native sized integers, function pointers, suppress emitting localsinit flag, and unconstrained type parameter annotations.

[C# 10 Specification Proposals](~/_csharplang/proposals/csharp-10.0/record-structs.md)\
C# 10 is available with .NET 6. The features include record structs, parameterless struct constructors, global using directives, file-scoped namespaces, extended property patterns, improved interpolated strings, constant interpolated strings, lambda improvements, caller-argument expression, enhanced `#line` directives, generic attributes, improved definite assignment analysis, and `AsyncMethodBuilder` override.

## Related sections

Expand Down
14 changes: 6 additions & 8 deletions docs/csharp/whats-new/csharp-version-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,9 @@ C# 8.0 is the first major C# release that specifically targets .NET Core. Some f

Default interface members require enhancements in the CLR. Those features were added in the CLR for .NET Core 3.0. Ranges and indexes, and asynchronous streams require new types in the .NET Core 3.0 libraries. Nullable reference types, while implemented in the compiler, is much more useful when libraries are annotated to provide semantic information regarding the null state of arguments and return values. Those annotations are being added in the .NET Core libraries.

## C# version 9.0
## C# version 9

C# 9.0 was released with .NET 5. It's the default language version for any assembly that targets the .NET 5 release. It contains the following new and enhanced features:

C# 9.0 adds the following features and enhancements to the C# language:
C# 9 was released with .NET 5. It's the default language version for any assembly that targets the .NET 5 release. It contains the following new and enhanced features:

- [Records](./csharp-9.md#record-types)
- [Init only setters](./csharp-9.md#init-only-setters)
Expand All @@ -275,11 +273,11 @@ C# 9.0 adds the following features and enhancements to the C# language:
- [Module initializers](~/_csharplang/proposals/csharp-9.0/module-initializers.md)
- [New features for partial methods](~/_csharplang/proposals/csharp-9.0/extending-partial-methods.md)

C# 9.0 continues three of the themes from previous releases: removing ceremony, separating data from algorithms, and providing more patterns in more places.
C# 9 continues three of the themes from previous releases: removing ceremony, separating data from algorithms, and providing more patterns in more places.

[Top level statements](../fundamentals/program-structure/top-level-statements.md) means your main program is simpler to read. There's less need for ceremony: a namespace, a `Program` class, and `static void Main()` are all unnecessary.

The introduction of [`records`](../language-reference/builtin-types/record.md) provide a concise syntax for reference types that follow value semantics for equality. You'll use these types to define data containers that typically define minimal behavior. [Init-only setters](./csharp-9.md#init-only-setters) provide the capability for non-destructive mutation (`with` expressions) in records. C# 9.0 also adds [covariant return types](~/_csharplang/proposals/csharp-9.0/covariant-returns.md) so that derived records can override virtual methods and return a type derived from the base method's return type.
The introduction of [`records`](../language-reference/builtin-types/record.md) provide a concise syntax for reference types that follow value semantics for equality. You'll use these types to define data containers that typically define minimal behavior. [Init-only setters](./csharp-9.md#init-only-setters) provide the capability for non-destructive mutation (`with` expressions) in records. C# 9 also adds [covariant return types](~/_csharplang/proposals/csharp-9.0/covariant-returns.md) so that derived records can override virtual methods and return a type derived from the base method's return type.

The [pattern matching](../fundamentals/functional/pattern-matching.md) capabilities have been expanded in several ways. Numeric types now support *range patterns*. Patterns can be combined using `and`, `or`, and `not` patterns. Parentheses can be added to clarify more complex patterns.

Expand All @@ -294,7 +292,7 @@ Another set of improvements supports scenarios where *code generators* add funct
- [Module initializers](../language-reference/attributes/general.md#moduleinitializer-attribute) are methods that the runtime calls when an assembly loads.
- [Partial methods](../language-reference/keywords/partial-method.md) support new accessibly modifiers and non-void return types. In those cases, an implementation must be provided.

C# 9.0 adds many other small features that improve developer productivity, both writing and reading code:
C# 9 adds many other small features that improve developer productivity, both writing and reading code:

- Target-type `new` expressions
- `static` anonymous functions
Expand All @@ -303,6 +301,6 @@ C# 9.0 adds many other small features that improve developer productivity, both
- Lambda expressions can declare discard parameters
- Attributes can be applied to local functions

The C# 9.0 release continues the work to keep C# a modern, general-purpose programming language. Features continue to support modern workloads and application types.
The C# 9 release continues the work to keep C# a modern, general-purpose programming language. Features continue to support modern workloads and application types.

_Article_ [_originally published on the NDepend blog_](https://blog.ndepend.com/c-versions-look-language-history/)_, courtesy of Erik Dietrich and Patrick Smacchia._
1 change: 0 additions & 1 deletion docs/standard/clr.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ helpviewer_keywords:
- "source code execution"
- "code, runtime functionality"
ms.assetid: 059a624e-f7db-4134-ba9f-08b676050482
ms.custom: "updateeachrelease"
---
# Common Language Runtime (CLR) overview

Expand Down
26 changes: 20 additions & 6 deletions docs/standard/whats-new/whats-new-in-dotnet-standard.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
---
title: "What's new in .NET Standard"
description: This article summarizes new features and enhancements found in each new version of .NET Standard.
ms.custom: updateeachrelease
ms.date: 04/12/2018
ms.date: 12/09/2021
ms.prod: dotnet-whatsnew
---
# What's new in .NET Standard

.NET Standard is a formal specification that defines a versioned set of APIs that must be available on .NET implementations that comply with that version of the standard. .NET Standard is targeted at library developers. A library that targets a .NET Standard version can be used on any .NET Framework, .NET Core, or Xamarin implementation that supports that version of the standard.
.NET Standard is a formal specification that defines a versioned set of APIs that must be available on .NET implementations that comply with that version of the standard. .NET Standard is targeted at library developers. A library that targets a .NET Standard version can be used on any .NET or Xamarin implementation that supports that version of the standard.

.NET Standard is included with the .NET SDK, as well as with Visual Studio when you select the .NET workload.
.NET Standard is included with the .NET SDK. It's also included with Visual Studio if you select the .NET workload.

.NET Standard 2.1 is the last version of .NET Standard that will be released. For more information, see [.NET 5+ and .NET Standard](../net-standard.md#net-5-and-net-standard).

## Supported .NET implementations

.NET Standard 2.1 is supported by the following .NET implementations:

- .NET Core 3.0 or later (including .NET 5 and later)
- Mono 6.4 or later
- Xamarin.iOS 12.16 or later
- Xamarin.Android 10.0 or later

.NET Standard 2.0 is supported by the following .NET implementations:

- .NET Core 2.0 or later
- .NET Core 2.0 or later (including .NET 5 and later)
- .NET Framework 4.6.1 or later
- Mono 5.4 or later
- Xamarin.iOS 10.14 or later
- Xamarin.Mac 3.8 or later
- Xamarin.Android 8.0 or later
- Universal Windows Platform 10.0.16299 or later

## What's new in .NET Standard 2.1

.NET Standard 2.1 adds many APIs to the standard. Some of them are new APIs, and others are existing APIs that help to converge the .NET implementations even further. For a list of the APIs that have been added to .NET Standard 2.1, see [.NET Standard 2.1 vs 2.0](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard2.1_diff.md).

For more information, see the [Announcing .NET Standard 2.1](https://devblogs.microsoft.com/dotnet/announcing-net-standard-2-1/) blog post.

## What's new in .NET Standard 2.0

.NET Standard 2.0 includes the following new features:
.NET Standard 2.0 includes the following new features.

### A vastly expanded set of APIs

Expand Down
Loading

0 comments on commit dcbdcb5

Please sign in to comment.