Skip to content

Merge main into live #32492

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 29 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e616c66
Bump Microsoft.Extensions.DependencyInjection.Abstractions
dependabot[bot] Nov 7, 2022
8b86f7b
Fix dotnet trace option help message (#32357)
JongHeonChoi Nov 9, 2022
a978c0f
Add deprecation-notice to rule CA2109 (#31797)
x789 Nov 9, 2022
532a46c
Merge pull request #32313 from dotnet/dependabot/nuget/docs/devops/sn…
github-actions[bot] Nov 9, 2022
5d91ed5
Fix cancellation by polling example (#31643) (#31695)
JJS Nov 9, 2022
04ed47f
Bump Microsoft.Extensions.Hosting
dependabot[bot] Nov 9, 2022
5bcd4fe
Merge pull request #32292 from dotnet/dependabot/nuget/docs/devops/sn…
github-actions[bot] Nov 9, 2022
373f8dd
Add updateeachrelease metadata (#32354)
gewarren Nov 9, 2022
9218dd2
update articles for .NET 7 (#32359)
gewarren Nov 9, 2022
832609d
Fix errors of Data Access snippet (#31972)
sunghwan2789 Nov 9, 2022
ce1a495
Update dotnet-install-script.md (#32349)
tdykstra Nov 9, 2022
92e934a
Add an additional resource to rabbitmq-development (#31767)
awright18 Nov 9, 2022
4b59282
Update backward-compatibility-guidelines.md (#31610)
zeynelok Nov 9, 2022
8500268
Create config and infrastructure for a What's new in docs for a relea…
BillWagner Nov 9, 2022
812d4b2
Update package index with latest published versions (#32464)
azure-sdk Nov 9, 2022
95e11f9
Update package index with latest published versions (#32469)
azure-sdk Nov 9, 2022
9f5eafc
Add tizen RIDs in rid-catalog.md (#32361)
JongHeonChoi Nov 9, 2022
d272cb6
Fix method name (#32466)
gewarren Nov 9, 2022
009e66c
Update links in what's new article (#32471)
gewarren Nov 9, 2022
5b024c2
Update package index with latest published versions (#32473)
azure-sdk Nov 9, 2022
565778d
Update index.md (#32474)
Rick-Anderson Nov 9, 2022
bb63d06
ML.NET doc updates (#32011)
luisquintanilla Nov 10, 2022
6353f3a
Update package index with latest published versions (#32484)
azure-sdk Nov 10, 2022
a4c59af
Extension upgrades (#32468)
IEvangelist Nov 10, 2022
735d163
Update package index with latest published versions (#32489)
azure-sdk Nov 10, 2022
13abe5c
Copy edit What's new in Orleans (#32493)
chwarr Nov 10, 2022
9101a5f
Add note about localized IntelliSense (#32488)
gewarren Nov 10, 2022
f569e38
fixed typo in when.md (#32472)
Nov 10, 2022
ddc053d
Add `--duration` doc for dotnet-trace fixes #32088 (#32089)
alex-jitbit Nov 10, 2022
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
2 changes: 1 addition & 1 deletion .whatsnew.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"maximumNumberOfArticles": 3,
"tocParentNode": "What's new",
"repoTocFolder": "docs/whats-new",
"indexParentNode": "Find .NET updates",
"indexParentNode": "Latest documentation updates",
"repoIndexFolder": "docs/whats-new"
},
"areas": [
Expand Down
81 changes: 81 additions & 0 deletions .whatsnew.release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$schema": "https://whatsnewapi.azurewebsites.net/schema",
"docSetProductName": ".NET",
"rootDirectory": "docs/",
"docLinkSettings": {
"linkFormat": "relative",
"relativeLinkPrefix": "../"
},
"inclusionCriteria": {
"labels": [
"label:\":checkered_flag: Release: .NET 7\""
],
"maxFilesChanged": 100,
"minAdditionsToFile": 1
},
"navigationOptions": {
"maximumNumberOfArticles": 4,
"tocParentNode": "What's new",
"repoTocFolder": "docs/whats-new",
"indexParentNode": ".NET release updates",
"repoIndexFolder": "docs/whats-new"
},
"areas": [
{
"names": [ "." ],
"heading": "Home"
},
{
"names": [ "architecture" ],
"heading": "Architecture guides"
},
{
"names": [ "azure" ],
"heading": "Azure SDK for .NET"
},
{
"names": [ "csharp" ],
"heading": "C# language"
},
{
"names": [ "desktop-wpf" ],
"heading": ".NET Core desktop"
},
{
"names": [ "framework" ],
"heading": ".NET Framework"
},
{
"names": [ "fsharp" ],
"heading": "F# language"
},
{
"names": [ "core/compatibility" ],
"heading": ".NET breaking changes"
},
{
"names": [ "core", "fundamentals", "standard" ],
"heading": ".NET fundamentals"
},
{
"names": [ "iot" ],
"heading": ".NET IoT libraries"
},
{
"names": [ "machine-learning" ],
"heading": "ML.NET"
},
{
"names": [ "spark" ],
"heading": ".NET for Apache Spark"
},
{
"names": [ "visual-basic" ],
"heading": "Visual Basic language"
},
{
"names": [ "orleans", "dotnet-orleans" ],
"heading": "Microsoft Orleans"
}
]
}
6 changes: 3 additions & 3 deletions api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ description: "Learn more about: .NET API browser"
layout: ApiBrowserPage
hide_bc: true
title: .NET API browser
quickFilterColumn1: net-6.0,netframework-4.8,netstandard-2.1
quickFilterColumn2: aspnetcore-6.0,efcore-6.0,xamarin-forms
quickFilterColumn1: net-7.0,netframework-4.8,netstandard-2.1
quickFilterColumn2: aspnetcore-7.0,efcore-6.0,xamarin-forms
quickFilterColumn3: azure-dotnet,ml-dotnet,spark-dotnet
ms.topic: landing-page
ms.custom: "updateeachrelease"
ms.date: 06/22/2022
ms.date: 11/08/2022
---
# .NET API browser

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ A production-ready solution with support for RabbitMQ.

- **NServiceBus** - Fully-supported commercial service bus with advanced management and monitoring tooling for .NET \
<https://particular.net/>

- **EasyNetQ** - Open Source .NET API client for RabbitMQ \
<https://easynetq.com/>

Expand Down
46 changes: 23 additions & 23 deletions docs/azure/includes/dotnet-all.md

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions docs/azure/includes/dotnet-new.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ms.date: 10/20/2022

We updated the support for authentication in Blazor WebAssembly apps to rely on the history state instead of query strings in the URL. As a result, existing applications that pass the return URL through the query string will fail to redirect back to the original page after a successful login.

Existing applications should use the new <xref:Microsoft.AspNetCore.Components.WebAssembly.Authentication.NavigationManagerExtensions.NavigateToLogout%2A> extension method as it's able to flow the data to the login page correctly.
Existing applications should use the new <xref:Microsoft.AspNetCore.Components.WebAssembly.Authentication.NavigationManagerExtensions.NavigateToLogin%2A> extension method as it's able to flow the data to the login page correctly.

## Version introduced

Expand Down Expand Up @@ -51,3 +51,7 @@ Most apps have a *RedirectToLogin.razor* file that you can update as follows:
## Affected APIs

- <xref:Microsoft.AspNetCore.Components.WebAssembly.Authentication.SignOutSessionStateManager?displayProperty=fullName> (obsoleted in favor of new <xref:Microsoft.AspNetCore.Components.WebAssembly.Authentication.NavigationManagerExtensions.NavigateToLogout%2A?displayProperty=nameWithType> method)

## See also

- [RedirectToLogin component - Blazor WebAssembly](/aspnet/core/blazor/security/webassembly/standalone-with-authentication-library?view=aspnetcore-7.0&tabs=visual-studio#redirecttologin-component)
8 changes: 6 additions & 2 deletions docs/core/deploying/deploy-with-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Publish apps with the .NET CLI
description: Learn to publish a .NET application using the .NET CLI commands.
author: adegeo
ms.author: adegeo
ms.date: 03/30/2022
ms.date: 11/08/2022
ms.custom: updateeachrelease
dev_langs:
- "csharp"
Expand Down Expand Up @@ -31,6 +31,7 @@ Looking for some quick help on using the CLI? The following table shows some exa
| | 3.1 | `dotnet publish -c Release -r <RID> --self-contained true` |
| | 5.0 | `dotnet publish -c Release -r <RID> --self-contained true` |
| | 6.0 | `dotnet publish -c Release -r <RID> --self-contained true` |
| | 7.0 | `dotnet publish -c Release -r <RID> --self-contained true` |

\* When using **SDK version 3.1** or higher, framework-dependent executable is the default publishing mode when running the basic `dotnet publish` command.

Expand Down Expand Up @@ -122,6 +123,7 @@ Publishing an FDD creates an app that automatically rolls-forward to the latest
| | 3.1 | `dotnet publish -c Release -p:UseAppHost=false` |
| | 5.0 | `dotnet publish -c Release -p:UseAppHost=false` |
| | 6.0 | `dotnet publish -c Release -p:UseAppHost=false` |
| | 7.0 | `dotnet publish -c Release -p:UseAppHost=false` |

## Framework-dependent executable

Expand All @@ -146,6 +148,7 @@ For .NET 2.1, you must use the following switches with the `dotnet publish` comm
| Framework-dependent executable | 3.1 | `dotnet publish -c Release -r <RID> --self-contained false`<br>`dotnet publish -c Release` |
| | 5.0 | `dotnet publish -c Release -r <RID> --self-contained false`<br>`dotnet publish -c Release` |
| | 6.0 | `dotnet publish -c Release -r <RID> --self-contained false`<br>`dotnet publish -c Release` |
| | 7.0 | `dotnet publish -c Release -r <RID> --self-contained false`<br>`dotnet publish -c Release` |

Whenever you use the `-r` switch, the output folder path changes to: `./bin/<BUILD-CONFIGURATION>/<TFM>/<RID>/publish/`

Expand Down Expand Up @@ -174,9 +177,10 @@ You must use the following switches with the `dotnet publish` command to publish
| | 3.1 | `dotnet publish -c Release -r <RID> --self-contained true` |
| | 5.0 | `dotnet publish -c Release -r <RID> --self-contained true` |
| | 6.0 | `dotnet publish -c Release -r <RID> --self-contained true` |
| | 7.0 | `dotnet publish -c Release -r <RID> --self-contained true` |

> [!TIP]
> In .NET 6 you can reduce the total size of compatible self-contained apps by [publishing trimmed](trimming/trim-self-contained.md). This enables the trimmer to remove parts of the framework and referenced assemblies that are not on any code path or potentially referenced in [runtime reflection](../../csharp/programming-guide/concepts/reflection.md). See [trimming incompatibilities](./trimming/incompatibilities.md) to determine if trimming makes sense for your application.
> In .NET 6 and later versions, you can reduce the total size of compatible self-contained apps by [publishing trimmed](trimming/trim-self-contained.md). This enables the trimmer to remove parts of the framework and referenced assemblies that are not on any code path or potentially referenced in [runtime reflection](../../csharp/programming-guide/concepts/reflection.md). See [trimming incompatibilities](./trimming/incompatibilities.md) to determine if trimming makes sense for your application.

> [!NOTE]
> You can reduce the total size of your deployment by enabling **globalization invariant mode**. This mode is useful for applications that are not globally aware and that can use the formatting conventions, casing conventions, and string comparison and sort order of the [invariant culture](xref:System.Globalization.CultureInfo.InvariantCulture). For more information about **globalization invariant mode** and how to enable it, see [.NET Core Globalization Invariant Mode](https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md).
Expand Down
14 changes: 11 additions & 3 deletions docs/core/diagnostics/dotnet-trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ The `dotnet-trace` tool:
- **`--version`**

Displays the version of the dotnet-trace utility.

- **`--duration`**

How log to run the trace. `--duration 00:00:00:05` will run it for 5 seconds.

## Commands

Expand All @@ -70,13 +74,13 @@ The `dotnet-trace` tool:

## dotnet-trace collect

Collects a diagnostic trace from a running process or launches a child process and traces it (.NET 5+ only). To have the tool run a child process and trace it from its startup, append `--` to the collect command.
Collects a diagnostic trace from a running process or launches a child process and traces it (.NET 5 or later). To have the tool run a child process and trace it from its startup, append `--` to the collect command.

### Synopsis

```dotnetcli
dotnet-trace collect [--buffersize <size>] [--clreventlevel <clreventlevel>] [--clrevents <clrevents>]
[--format <Chromium|NetTrace|Speedscope>] [-h|--help]
[--format <Chromium|NetTrace|Speedscope>] [-h|--help] [--duration dd:hh:mm:ss]
[-n, --name <name>] [--diagnostic-port] [-o|--output <trace-file-path>] [-p|--process-id <pid>]
[--profile <profile-name>] [--providers <list-of-comma-separated-providers>]
[--show-child-io]
Expand Down Expand Up @@ -151,6 +155,10 @@ dotnet-trace collect [--buffersize <size>] [--clreventlevel <clreventlevel>] [--
- **`--diagnostic-port <path-to-port>`**

The name of the diagnostic port to create. See [Use diagnostic port to collect a trace from app startup](#use-diagnostic-port-to-collect-a-trace-from-app-startup) to learn how to use this option to collect a trace from app startup.

- **`--duration <time-to-run>`**

The time for the trace to run. Use the `dd:hh:mm:ss` format. For example `00:00:00:05` will run it for 5 seconds.

- **`-o|--output <trace-file-path>`**

Expand Down Expand Up @@ -182,7 +190,7 @@ dotnet-trace collect [--buffersize <size>] [--clreventlevel <clreventlevel>] [--

To learn more about some of the well-known providers in .NET, refer to [Well-known Event Providers](./well-known-event-providers.md).

- **`-- <command>` (for target applications running .NET 5 only)**
- **`-- <command>` (for target applications running .NET 5 or later)**

After the collection configuration parameters, the user can append `--` followed by a command to start a .NET application with at least a 5.0 runtime. This may be helpful when diagnosing issues that happen early in the process, such as startup performance issue or assembly loader and binder errors.

Expand Down
14 changes: 7 additions & 7 deletions docs/core/extensions/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ title: Caching in .NET
description: Learn how to use various in-memory and distributed caching mechanisms in .NET.
author: IEvangelist
ms.author: dapine
ms.date: 12/08/2021
ms.date: 11/09/2022
---

# Caching in .NET

In this article, you'll learn about various caching mechanisms. Caching is the act of storing data in an intermediate-layer, making subsequent data retrievals faster. Conceptually, caching is a performance optimization strategy and design consideration. Caching can significantly improve app performance by making infrequently changing (or expensive to retrieve) data more readily available. This article introduces the two primary types of caching, and provides sample source code for both:

- [`Microsoft.Extensions.Caching.Memory`](/dotnet/api/microsoft.extensions.caching.memory)
- [`Microsoft.Extensions.Caching.Distributed`](/dotnet/api/microsoft.extensions.caching.distributed)
- [Microsoft.Extensions.Caching.Memory](/dotnet/api/microsoft.extensions.caching.memory)
- [Microsoft.Extensions.Caching.Distributed](/dotnet/api/microsoft.extensions.caching.distributed)

> [!IMPORTANT]
> There are two `MemoryCache` classes within .NET, one in the `System.Runtime.Caching` namespace and the other in the `Microsoft.Extensions.Caching` namespace:
Expand All @@ -25,7 +25,7 @@ All of the `Microsoft.Extensions.*` packages come dependency injection (DI) read

## In-memory caching

In this section, you'll learn about the [`Microsoft.Extensions.Caching.Memory`](/dotnet/api/microsoft.extensions.caching.memory) package. The current implementation of the <xref:Microsoft.Extensions.Caching.Memory.IMemoryCache> is a wrapper around the <xref:System.Collections.Concurrent.ConcurrentDictionary%602>, exposing a feature-rich API. Entries within the cache are represented by the <xref:Microsoft.Extensions.Caching.Memory.ICacheEntry>, and can be any `object`. The in-memory cache solution is great for apps that run in a single server, where all the cached data rents memory in the app's process.
In this section, you'll learn about the [Microsoft.Extensions.Caching.Memory](/dotnet/api/microsoft.extensions.caching.memory) package. The current implementation of the <xref:Microsoft.Extensions.Caching.Memory.IMemoryCache> is a wrapper around the <xref:System.Collections.Concurrent.ConcurrentDictionary%602>, exposing a feature-rich API. Entries within the cache are represented by the <xref:Microsoft.Extensions.Caching.Memory.ICacheEntry>, and can be any `object`. The in-memory cache solution is great for apps that run on a single server, where all the cached data rents memory in the app's process.

> [!TIP]
> For multi-server caching scenarios, consider the [Distributed caching](#distributed-caching) approach as an alternative to in-memory caching.
Expand Down Expand Up @@ -200,7 +200,7 @@ In the preceding C# code:
- The `CacheSignal<T>` class is registered with <xref:Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton%2A>.
- The `host` is instantiated from the builder, and started asynchronously.

The `PhotoService` is responsible for getting photos that match a given criteria (or `filter`):
The `PhotoService` is responsible for getting photos that match given criteria (or `filter`):

:::code source="snippets/caching/memory-worker/PhotoService.cs":::

Expand All @@ -212,7 +212,7 @@ In the preceding C# code:
- Calls and waits for the `_cacheSignal.WaitAsync()` to release, this ensures that the cache is populated before accessing the cache.
- Calls `_cache.GetOrCreateAsync()`, asynchronously getting all of the photos in the cache.
- The `factory` argument logs a warning, and returns an empty photo array - this should never happen.
- Each photo in the cache is iterated, filtered and materialized with `yield return`.
- Each photo in the cache is iterated, filtered, and materialized with `yield return`.
- Finally, the cache signal is reset.

Consumers of this service are free to call `GetPhotosAsync` method, and handle photos accordingly. No `HttpClient` is required as the cache contains the photos.
Expand Down Expand Up @@ -301,7 +301,7 @@ There are several convenience-based extension methods for reading values, that h

#### Update values

There is no way to actually update the values in the distributed cache with a single API call, instead values can have their sliding expirations reset with one of the refresh APIs:
There is no way to update the values in the distributed cache with a single API call, instead, values can have their sliding expirations reset with one of the refresh APIs:

- <xref:Microsoft.Extensions.Caching.Distributed.IDistributedCache.RefreshAsync%2A?displayProperty=nameWithType>
- <xref:Microsoft.Extensions.Caching.Distributed.IDistributedCache.Refresh%2A?displayProperty=nameWithType>
Expand Down
2 changes: 1 addition & 1 deletion docs/core/extensions/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Channels
description: Learn how to use System.Threading.Channels in .NET.
author: IEvangelist
ms.author: dapine
ms.date: 08/03/2022
ms.date: 11/09/2022
---

# System.Threading.Channels library
Expand Down
2 changes: 1 addition & 1 deletion docs/core/extensions/configuration-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Configuration providers
description: Learn how the Configuration provider API is used to configure .NET applications.
author: IEvangelist
ms.author: dapine
ms.date: 10/12/2022
ms.date: 11/09/2022
ms.topic: reference
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/extensions/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Configuration
description: Learn how to use the Configuration API to configure .NET applications.
author: IEvangelist
ms.author: dapine
ms.date: 11/19/2021
ms.date: 11/09/2022
ms.topic: overview
---

Expand Down
Loading