Skip to content

Commit

Permalink
Merge main into live (#38923)
Browse files Browse the repository at this point in the history
* Fix typography at sample code in fsharp snippets (#38913)

* Extract remarks for System.Globalization* (#38912)

* fix build suggestions (#38917)

* Remove snap reference from include file (#38902)

* clarify linux portions of http3/libmsquic (#38901)

* Add note about linux and IPC (#38849)

* Update package index with latest published versions (#38920)

* Update ScopedBackgroundService (#38880)

* Update ScopedBackgroundService.cs

* Update scoped-service.md

* Make it clear you can install multiple versions (#38919)

* Make it clear you can install multiple versions

* more clarifications

* fix link

* clarify greps (#38921)

* Add clarifications around Arm packages and Ubuntu (#38922)

* Clarify Arm

* Clarify Arm

---------

Co-authored-by: Takamasa Matsui <59013192+tkmsaaaam@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Varorbc <Varorbc@gmail.com>
  • Loading branch information
6 people committed Dec 30, 2023
1 parent 79fce0a commit 233d484
Show file tree
Hide file tree
Showing 77 changed files with 3,070 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ The implicit public default constructor for `System.Runtime.InteropServices.Java

## Previous behavior

Previously, you could create empty instances of <xref:System.Runtime.InteropServices.JavaScript.JSFunctionBinding>.
Previously, you could create empty instances of `System.Runtime.InteropServices.JavaScript.JSFunctionBinding`.

## New behavior

Starting in .NET 8, you can't instantiate a <xref:System.Runtime.InteropServices.JavaScript.JSFunctionBinding> object.
Starting in .NET 8, you can't instantiate a `System.Runtime.InteropServices.JavaScript.JSFunctionBinding` object.

## Version introduced

Expand Down
7 changes: 3 additions & 4 deletions docs/core/extensions/httpclient-http3.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ HTTP/3 and QUIC both have several benefits compared to HTTP/1.1 and HTTP/2:
- Supports transitioning between networks. This feature is useful for mobile devices where it's common to switch between WIFI and cellular networks as a mobile device changes location. Currently, HTTP/1.1 and HTTP/2 connections fail with an error when switching networks. An app or web browser must retry any failed HTTP requests. HTTP/3 allows the app or web browser to seamlessly continue when a network changes. <xref:System.Net.Http.HttpClient> and Kestrel don't support network transitions in .NET 7. It may be available in a future release.

> [!IMPORTANT]
>
> Apps configured to take advantage of HTTP/3 should be designed to also support HTTP/1.1 and HTTP/2. If issues are identified in HTTP/3, it's recommend disabling HTTP/3 until the issues are resolved in a future release of .NET.
## HttpClient settings
Expand All @@ -29,7 +28,7 @@ The HTTP version can be configured by setting `HttpRequestMessage.Version` to 3.

## Platform dependencies

HTTP/3 uses QUIC as its transport protocol. The .NET implementation of HTTP/3 uses [MsQuic](https://github.com/microsoft/msquic) to provide QUIC functionality. As a result, .NET support of HTTP/3 depends on MsQuic platform requirements, which are documented in [QUIC Platform dependencies](../../fundamentals/networking/quic/quic-overview.md#platform-dependencies). If the platform that HttpClient is running on doesn't have all the requirements for HTTP/3, then it's disabled.
HTTP/3 uses QUIC as its transport protocol. The .NET implementation of HTTP/3 uses [MsQuic](https://github.com/microsoft/msquic) to provide QUIC functionality. As a result, .NET support of HTTP/3 depends on MsQuic platform requirements. For more information on how to install **MsQuic**, see [QUIC Platform dependencies](../../fundamentals/networking/quic/quic-overview.md#platform-dependencies). If the platform that HttpClient is running on doesn't have all the requirements for HTTP/3, then it's disabled.

## Using HttpClient

Expand All @@ -54,11 +53,11 @@ Alternatively, you can call <xref:System.AppContext.SetSwitch%2A?displayProperty

The reason for requiring a configuration flag for HTTP/3 is to protect apps from future breakage when using version policy `RequestVersionOrHigher`. When calling a server that currently uses HTTP/1.1 and HTTP/2, if the server later upgrades to HTTP/3, the client would try to use HTTP/3 and potentially be incompatible as the standard isn't final and therefore may change after .NET 6 is released.

.NET 6 is only compatible with the 1.9.x versions of libmsquic. Libmsquic 2.x isn't compatible with .NET 6 due to breaking changes in the library. Libmsquic receives updates to 1.9.x when needed to incorporate security fixes.
.NET 6 is only compatible with the 1.9.x versions of libmsquic. Libmsquic 2.x isn't compatible with .NET 6 due to breaking changes in the library. Libmsquic receives updates to 1.9.x when needed to incorporate security fixes.

## HTTP/3 Server

HTTP/3 is supported by ASP.NET with the Kestrel server in .NET 6 (preview) and .NET 7 (fully supported). For more information, see [use HTTP/3 with the ASP.NET Core Kestrel web server][http3Kestrel].
HTTP/3 is supported by ASP.NET with the Kestrel server in .NET 6 (as a preview) and .NET 7 (is fully supported). For more information, see [use HTTP/3 with the ASP.NET Core Kestrel web server][http3Kestrel].

## Public test servers

Expand Down
2 changes: 1 addition & 1 deletion docs/core/extensions/scoped-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Replace the existing `Worker` class with the following C# code, and rename the f

:::code source="snippets/workers/scoped-service/ScopedBackgroundService.cs" highlight="22-28":::

In the preceding code, an explicit scope is created and the `IScopedProcessingService` implementation is resolved from the dependency injection service provider. The resolved service instance is scoped, and its `DoWorkAsync` method is awaited.
In the preceding code, an explicit scope is created and the `IScopedProcessingService` implementation is resolved from the dependency injection service scope factory. The resolved service instance is scoped, and its `DoWorkAsync` method is awaited.

Replace the template *Program.cs* file contents with the following C# code:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace App.ScopedService;

public sealed class ScopedBackgroundService(
IServiceProvider serviceProvider,
IServiceScopeFactory serviceScopeFactory,
ILogger<ScopedBackgroundService> logger) : BackgroundService
{
private const string ClassName = nameof(ScopedBackgroundService);
Expand All @@ -19,7 +19,7 @@ private async Task DoWorkAsync(CancellationToken stoppingToken)
logger.LogInformation(
"{Name} is working.", ClassName);

using (IServiceScope scope = serviceProvider.CreateScope())
using (IServiceScope scope = serviceScopeFactory.CreateScope())
{
IScopedProcessingService scopedProcessingService =
scope.ServiceProvider.GetRequiredService<IScopedProcessingService>();
Expand Down
40 changes: 23 additions & 17 deletions docs/core/install/how-to-detect-installed-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,20 @@ Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.Win
::: zone pivot="os-linux"

```bash
Microsoft.AspNetCore.All 2.1.7 [/home/user/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [/home/user/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.7 [/home/user/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [/home/user/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [/home/user/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [/home/user/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0 [/home/user/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.7 [/home/user/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [/home/user/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [/home/user/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [/home/user/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [/home/user/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [/home/user/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [/home/user/dotnet/shared/Microsoft.NETCore.App]
Microsoft.AspNetCore.All 2.1.7 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.7 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.7 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
```

::: zone-end
Expand Down Expand Up @@ -156,13 +156,19 @@ _C:\\program files\\dotnet\\shared\\{runtime-type}\\{version}\\_
::: zone pivot="os-linux"

- **dotnet executable**\
_/home/user/share/dotnet/dotnet_
_/home/user/.dotnet/dotnet_\
_/usr/lib/dotnet/dotnet_\
_/usr/share/dotnet/dotnet_\

- **.NET SDK**\
_/home/user/share/dotnet/sdk/{version}/_
_/home/user/.dotnet/sdk/{version}/_\
_/usr/lib/dotnet/sdk/{version}/_\
_/usr/share/dotnet/sdk/{version}/_\

- **.NET Runtime**\
_/home/user/share/dotnet/shared/{runtime-type}/{version}/_
_/home/user/.dotnet/shared/{runtime-type}/{version}/_\
_/usr/lib/dotnet/shared/{runtime-type}/{version}/_\
_/usr/share/dotnet/shared/{runtime-type}/{version}/_\

::: zone-end

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
author: adegeo
ms.author: adegeo
ms.date: 12/29/2023
ms.topic: include
---

> [!IMPORTANT]
> Using a package manager to install .NET from the **Microsoft pacakge feed** only supports the **x64** architecture. Other architectures, such as **Arm**, aren't supported by the **Microsoft package feed**. Use the Ubuntu feed or manually install .NET. Be cautious of package mix up problems. For more information, see [.NET package mix ups on Linux](../linux-package-mixup.md?pivots=os-linux-ubuntu#whats-going-on).
For more information on installing .NET **without a package manager**, see one of the following articles:

- [Use the `install-dotnet` script to install .NET.](../linux-scripted-manual.md#scripted-install)
- [Manually install .NET.](../linux-scripted-manual.md#manual-install)
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
author: adegeo
ms.author: adegeo
ms.date: 11/14/2023
ms.date: 12/29/2023
ms.topic: include
---

> [!IMPORTANT]
> Package manager installs are only supported on the **x64** architecture. Other architectures, such as **Arm**, must install .NET by some other means such as with Snap, an installer script, or through a manual binary installation.
> Using a package manager to install .NET from the **Microsoft pacakge feed** only supports the **x64** architecture. Other architectures, such as **Arm**, aren't supported by the **Microsoft package feed**.
For more information on installing .NET **without a package manager**, see one of the following articles:

- [Alternatively install .NET with `install-dotnet` script.](../linux-scripted-manual.md#scripted-install)
- [Manually install .NET](../linux-scripted-manual.md#manual-install)
- [Use the `install-dotnet` script to install .NET.](../linux-scripted-manual.md#scripted-install)
- [Manually install .NET.](../linux-scripted-manual.md#manual-install)
3 changes: 2 additions & 1 deletion docs/core/install/linux-package-mixup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Troubleshoot .NET package mix ups on Linux
description: Learn about how to troubleshoot strange .NET package errors on Linux. These errors may occur when you run the dotnet command.
author: omajid
ms.author: adegeo
ms.date: 03/01/2023
no-loc: ['usr','lib64','share','dotnet','libhostfxr.so', 'fxr', 'FrameworkList.xml', 'System.IO.FileNotFoundException']
zone_pivot_groups: operating-systems-set-two
Expand Down Expand Up @@ -202,7 +203,7 @@ Configure your package manager to ignore the .NET packages from the distribution
> Use the `apt-cache policy` command to find the source:
>
> ```bash
> apt-cache policy '~ndotnet.*' | grep -v microsoft | grep '/ubuntu' | cut -d"/" -f3 | sort -u
> apt-cache policy '~ndotnet.*' | grep -v microsoft | grep '/ubuntu' | grep updates | cut -d"/" -f3 | sort -u
> ```
01. Reinstall .NET from the Microsoft package feed. For more information, see [Install .NET on Linux](linux.md). If using Ubuntu, see [My Ubuntu distribution doesn't include the .NET version I want, or I need an out-of-support .NET version](linux-ubuntu.md#my-ubuntu-distribution-doesnt-include-the-net-version-i-want-or-i-need-an-out-of-support-net-version).
Expand Down
16 changes: 12 additions & 4 deletions docs/core/install/linux-scripted-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ Different versions of .NET can be extracted to the same folder, which coexist si

### Example

The following commands set the environment variable `DOTNET_ROOT` to the current working directory followed by `.dotnet`. They then create the directory if it doesn't exist and extract the contents of the file specified by the `DOTNET_FILE` environment variable to the `.dotnet` directory. Both the `.dotnet` directory and its `tools` subdirectory are added to the `PATH` environment variable.
<!-- Note, this content is copied in macos.md. Any fixes should be applied there too, though content may be different -->

The following commands use Bash to set the environment variable `DOTNET_ROOT` to the current working directory followed by `.dotnet`. That directory is created if it doesn't exist. The `DOTNET_FILE` environment variable is the filename of the .NET binary release you want to install. This file is extracted to the `DOTNET_ROOT` directory. Both the `DOTNET_ROOT` directory and its `tools` subdirectory are added to the `PATH` environment variable.

> [!IMPORTANT]
> If you run these commands, remember to change the `DOTNET_FILE` value to the name of the .NET binary you downloaded.
Expand All @@ -145,7 +147,13 @@ mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
```

The preceding install script approach allows installing different versions into separate locations so you can choose explicitly which one to use by which app. However, you can still install multiple versions of .NET to the same folder.
You can install more than one version of .NET in the same folder.

You can also install .NET to the home directory identified by the `HOME` variable or `~` path:

```bash
export DOTNET_ROOT=$HOME/.dotnet
```

## Verify downloaded binaries

Expand All @@ -157,7 +165,7 @@ The preceding install script approach allows installing different versions into

If you used the previous install script, the variables set only apply to your current terminal session. Add them to your shell profile. There are many different shells available for Linux and each has a different profile. For example:

- **Bash Shell**: *~/.bash_profile*, *~/.bashrc*
- **Bash Shell**: *~/.bash_profile* or *~/.bashrc*
- **Korn Shell**: *~/.kshrc* or *.profile*
- **Z Shell**: *~/.zshrc* or *.zprofile*

Expand All @@ -173,7 +181,7 @@ Set the following two environment variables in your shell profile:

- `PATH`

This variable should include both the `DOTNET_ROOT` folder and the user's _.dotnet/tools_ folder:
This variable should include both the `DOTNET_ROOT` folder and the `DOTNET_ROOT/tools` folder:

```bash
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Expand Down
2 changes: 1 addition & 1 deletion docs/core/install/linux-ubuntu-2304.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This article discusses how to install .NET on Ubuntu 23.04; .NET 8, .NET 7, and

[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)]

[!INCLUDE [linux-install-package-manager-x64-vs-arm](includes/linux-install-package-manager-x64-vs-arm.md)]
[!INCLUDE [linux-install-package-manager-x64-vs-arm-ubuntu](includes/linux-install-package-manager-x64-vs-arm-ubuntu.md)]

.NET is available in the Ubuntu package manager feeds, as well as the Microsoft package repository. However, you should only use one or the other to install .NET. If you want to use the Microsoft package repository, see [How to register the Microsoft package repository](linux-ubuntu.md#register-the-microsoft-package-repository).

Expand Down
2 changes: 1 addition & 1 deletion docs/core/install/linux-ubuntu-2310.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This article discusses how to install .NET on Ubuntu 23.10; .NET 8, .NET 7, and

[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)]

[!INCLUDE [linux-install-package-manager-x64-vs-arm](includes/linux-install-package-manager-x64-vs-arm.md)]
[!INCLUDE [linux-install-package-manager-x64-vs-arm-ubuntu](includes/linux-install-package-manager-x64-vs-arm-ubuntu.md)]

.NET is available in the Ubuntu package manager feeds, as well as the Microsoft package repository. However, you should only use one or the other to install .NET. If you want to use the Microsoft package repository, see [How to register the Microsoft package repository](linux-ubuntu.md#register-the-microsoft-package-repository).

Expand Down
2 changes: 1 addition & 1 deletion docs/core/install/macos-notarization-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Beginning with macOS Catalina (version 10.15), all software built after June 1,

## Installing .NET

The installers for .NET (both runtime and SDK) have been notarized since February 18, 2020. Prior released versions aren't notarized. You can manually install a non-notarized version of .NET by first downloading the installer, and then using the `sudo installer` command. For more information, see [Download and manually install for macOS](./macos.md#download-and-manually-install).
The installers for .NET (both runtime and SDK) have been notarized since February 18, 2020. Prior released versions aren't notarized. You can manually install a non-notarized version of .NET by first downloading the installer, and then using the `sudo installer` command. For more information, see [Download and manually install for macOS](./macos.md#manual-install).

## Native appHost

Expand Down
Loading

0 comments on commit 233d484

Please sign in to comment.