From b9b0074f44ae6aad561a0a42a4c512807819e2a8 Mon Sep 17 00:00:00 2001 From: skycommand <17097175+skycommand@users.noreply.github.com> Date: Thu, 17 Apr 2025 17:30:10 +0330 Subject: [PATCH 1/4] toc.yml: Move "Built-in types" to the top (#45834) This PR proposes moving the "Built-in types" node to top, above every other node and subbranch under the "Types" branch. Reason: The "Types" branch exclusively talks about built-in types. --- docs/csharp/language-reference/toc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/csharp/language-reference/toc.yml b/docs/csharp/language-reference/toc.yml index 4de8acc791d26..a445ac26198fc 100644 --- a/docs/csharp/language-reference/toc.yml +++ b/docs/csharp/language-reference/toc.yml @@ -10,6 +10,8 @@ items: href: ./configure-language-version.md - name: Types items: + - name: Built-in types + href: ./builtin-types/built-in-types.md - name: Value types items: - name: Overview @@ -68,8 +70,6 @@ items: href: ./builtin-types/arrays.md - name: void href: ./builtin-types/void.md - - name: Built-in types - href: ./builtin-types/built-in-types.md - name: Unmanaged types href: ./builtin-types/unmanaged-types.md - name: Default values From 8333f5006406a3120e674714de832e371a601a74 Mon Sep 17 00:00:00 2001 From: bforget163 <33746058+bforget163@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:08:20 +0800 Subject: [PATCH 2/4] Update ca2249.md and fix typo in the example code (#45842) --- .../code-analysis/quality-rules/ca2249.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2249.md b/docs/fundamentals/code-analysis/quality-rules/ca2249.md index e3ea320011d16..5a0924a5ef91a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2249.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2249.md @@ -110,22 +110,22 @@ class MyClass found = str.Contains('x'); // No comparisonType in string overload, adds StringComparison.CurrentCulture to resulting fix - found = !string.Contains("text", StringComparison.CurrentCulture); - found = string.Contains("text", StringComparison.CurrentCulture); + found = !str.Contains("text", StringComparison.CurrentCulture); + found = str.Contains("text", StringComparison.CurrentCulture); // comparisonType equal to StringComparison.Ordinal, removes the argument - found = !string.Contains('x'); - found = string.Contains('x'); + found = !str.Contains('x'); + found = str.Contains('x'); - found = !string.Contains("text"); - found = string.Contains("text"); + found = !str.Contains("text"); + found = str.Contains("text"); // comparisonType different than StringComparison.Ordinal, preserves the argument - ;found = !string.Contains('x', StringComparison.OrdinalIgnoreCase) - found = string.Contains('x', StringComparison.CurrentCulture); + found = !str.Contains('x', StringComparison.OrdinalIgnoreCase); + found = str.Contains('x', StringComparison.CurrentCulture); - found = !string.Contains("text", StringComparison.InvariantCultureIgnoreCase); - found = string.Contains("text", StringComparison.InvariantCulture); + found = !str.Contains("text", StringComparison.InvariantCultureIgnoreCase); + found = str.Contains("text", StringComparison.InvariantCulture); // This case had to be manually fixed if (!str.Contains("text")) From 0e92e7f2915c29d41f188394eb69db0f957a4955 Mon Sep 17 00:00:00 2001 From: Noah Falk Date: Thu, 17 Apr 2025 08:41:37 -0700 Subject: [PATCH 3/4] Warn about dotnet-dump memory usage (#45841) There has been a long known issue ( https://github.com/dotnet/runtime/issues/71472 ) that dotnet-dump increases memory usage, sometimes substantially. We haven't identified any quick/easy solution to reduce that memory usage so far. I want to make sure users are aware of it as a known limitation when working with the tool. --- docs/core/diagnostics/dotnet-dump.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/core/diagnostics/dotnet-dump.md b/docs/core/diagnostics/dotnet-dump.md index eed83a6307086..2150f79f12199 100644 --- a/docs/core/diagnostics/dotnet-dump.md +++ b/docs/core/diagnostics/dotnet-dump.md @@ -123,6 +123,11 @@ dotnet-dump collect [-h|--help] [-p|--process-id] [-n|--name] [--type] [-o|--out > [!NOTE] > To collect a dump using `dotnet-dump`, it needs to be run as the same user as the user running target process or as root. Otherwise, the tool will fail to establish a connection with the target process. +> [!NOTE] +> Collecting a full or heap dump may cause the OS to page in substantial virtual memory for the target process. If the target process is running in a container with an enforced memory limit, the increased memory usage +> may cause the OS to terminate the container if the limit was exceeded. We recommend testing to ensure the memory limit is set high enough. Another option is to temporarily change or remove the limit +> prior to dump collection if your environment supports doing so. + ## dotnet-dump analyze Starts an interactive shell to explore a dump. The shell accepts various [SOS commands](#analyze-sos-commands). From 39ab0f9e29bc70dff910bd0ea436ce9e224f89da Mon Sep 17 00:00:00 2001 From: Tim Paulus Date: Thu, 17 Apr 2025 21:30:52 +0200 Subject: [PATCH 4/4] Default build configuration is 'Release' since .NET 8 (#45846) --- docs/core/deploying/deploy-with-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/deploying/deploy-with-cli.md b/docs/core/deploying/deploy-with-cli.md index 0cccaf1591397..7485645b780f2 100644 --- a/docs/core/deploying/deploy-with-cli.md +++ b/docs/core/deploying/deploy-with-cli.md @@ -35,7 +35,7 @@ The `` setting of the project file specifies the default target If you want to target more than one framework, you can set the `` setting to multiple TFM values, separated by a semicolon. When you build your app, a build is produced for each target framework. However, when you publish your app, you must specify the target framework with the `dotnet publish -f ` command. -The default **BUILD-CONFIGURATION** mode is **Debug** unless changed with the `-c` parameter. +The default **BUILD-CONFIGURATION** mode is **Release** unless changed with the `-c` parameter. The default output directory of the [`dotnet publish`](../tools/dotnet-publish.md) command is `./bin///publish/`. For example, `dotnet publish -c Release -f net9.0` publishes to `./bin/Release/net9.0/publish/`. However, you can opt in to a simplified output path and folder structure for all build outputs. For more information, see [Artifacts output layout](../sdk/artifacts-output.md).