From e690a6c15f183e28b26ccc9f7946db8c2adf8e15 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 18:19:57 +0000 Subject: [PATCH 1/7] Initial plan From 46b81a15120ce31396950ac60a44dff80278033c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 18:46:27 +0000 Subject: [PATCH 2/7] Update .NET 11 What's New for RC 1 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/whats-new/dotnet-11/libraries.md | 116 +++++++++++++++++- docs/core/whats-new/dotnet-11/overview.md | 34 ++--- docs/core/whats-new/dotnet-11/runtime.md | 8 +- docs/core/whats-new/dotnet-11/sdk.md | 99 ++++++++++++++- .../dotnet-11/snippets/csharp/Libraries.cs | 84 +++++++++++++ 5 files changed, 314 insertions(+), 27 deletions(-) diff --git a/docs/core/whats-new/dotnet-11/libraries.md b/docs/core/whats-new/dotnet-11/libraries.md index d79394169a3fd..9087ba9509389 100644 --- a/docs/core/whats-new/dotnet-11/libraries.md +++ b/docs/core/whats-new/dotnet-11/libraries.md @@ -2,14 +2,14 @@ title: What's new in .NET libraries for .NET 11 description: Learn about the updates to the .NET libraries for .NET 11. titleSuffix: "" -ms.date: 08/25/2026 +ms.date: 09/08/2026 ai-usage: ai-assisted ms.update-cycle: 3650-days --- # What's new in .NET libraries for .NET 11 -This article describes new features in the .NET libraries for .NET 11. It was last updated for Preview 7. +This article describes new features in the .NET libraries for .NET 11. It was last updated for release candidate 1 (RC 1). ## Diagnostics and process execution @@ -71,6 +71,15 @@ AttachProfiler(process); process.SafeHandle.Resume(); ``` +#### Signal processes and inspect termination status + + exposes process signaling and exit-status APIs directly, without requiring you to work through : + +- sends a POSIX signal to the process. +- , , and return a , which distinguishes a normal exit from a signal-based termination. + +:::code language="csharp" source="./snippets/csharp/Libraries.cs" id="ProcessSignal"::: + ### Console FORCE_COLOR support .NET console output now honors the [`FORCE_COLOR`](https://force-color.org/) standard alongside the existing `NO_COLOR` support. When `FORCE_COLOR` is set, no longer suppresses ANSI escape codes. This is useful when you pipe `dotnet run` output through `tee`, into a CI log viewer, or through `less -R`: @@ -214,6 +223,21 @@ let json = System.Text.Json.JsonSerializer.Serialize(Circle 1.5) :::code language="csharp" source="./snippets/csharp/Libraries.cs" id="JsonSerializeAsyncEnumerablePipe"::: +#### Numeric type and binary-schema support + +`System.Text.Json` includes built-in converters for , , , and . These converters work with both the reflection-based serializer and the source generator, including named floating-point literals when enabled through . + +:::code language="csharp" source="./snippets/csharp/Libraries.cs" id="JsonNumericTypes"::: + + also identifies the base64 representation used for `byte[]`, , and . For `byte[]`, the exported schema now includes a `contentEncoding` keyword: + +```diff +- { "type": ["string", "null"] } ++ { "type": ["string", "null"], "contentEncoding": "base64" } +``` + +The `Memory` and `ReadOnlyMemory` schemas remain non-nullable (`"type": "string"`) and also include `contentEncoding`. + #### C# union type serialization `System.Text.Json` can now serialize and deserialize C# union types. The serializer recognizes a union through the new `JsonTypeInfoKind.Union` contract kind, reads and writes the active case, and supports both the reflection-based serializer and the source generator. When you serialize a union, `System.Text.Json` writes the value of whichever case is active, so a union of `int` and `string` round-trips cleanly: @@ -234,10 +258,25 @@ let json = System.Text.Json.JsonSerializer.Serialize(Circle 1.5) The new `JsonUnionAttribute` and `JsonUnionCaseInfo` APIs, along with type-classifier APIs (`JsonTypeClassifier` and `JsonSerializerOptions.TypeClassifiers`), let you customize how cases are discovered and named. Union types are a C# language preview feature. For more information, see [What's new in C# 15](../../../csharp/whats-new/csharp-15.md#union-types). +For a union with object-shaped cases, the built-in `JsonUnionTypeStructuralClassifier` selects the active case from its distinguishing property names, so you don't need to author a custom classifier: + +:::code language="csharp" source="./snippets/csharp/Libraries.cs" id="JsonUnionStructuralClassifier"::: + #### Closed-hierarchy polymorphism inference adds so the serializer can infer polymorphic metadata for C# closed hierarchies without requiring explicit annotations on each base type. Explicit registrations still take precedence. +You can also opt a single closed hierarchy in to this behavior with , without changing the application-wide `JsonSerializerOptions` setting: + +```csharp +[JsonPolymorphic(InferClosedTypePolymorphism = true)] +public abstract record Shape; + +public sealed record Circle(double Radius) : Shape; + +public sealed record Square(double Side) : Shape; +``` + ### Regular expression improvements #### AnyNewLine option @@ -292,6 +331,8 @@ For more information, see [DeflateStream and GZipStream write headers and footer :::code language="csharp" source="./snippets/csharp/Libraries.cs" id="ZLibEncoderSpan"::: +The streamless `DeflateEncoder`, `DeflateDecoder`, `ZLibEncoder`, `ZLibDecoder`, `GZipEncoder`, and `GZipDecoder` types also gain a `Reset()` method. Resetting returns an instance to its initial state so you can process another independent payload without allocating a replacement encoder or decoder. + ### Zstandard compression The Zstandard compression APIs, for example, and , are now part of the namespace, alongside `DeflateStream`, `GZipStream`, and `BrotliStream`. The API surface is otherwise unchanged. @@ -308,6 +349,7 @@ New overloads on and ](#generic-complext) - [BFloat16 support in BitConverter](#bfloat16-support-in-bitconverter) @@ -336,6 +378,12 @@ Because the three outer-join operations return tuples directly, you can work wit adds , , and , which implement IEEE 754-2019 decimal floating-point semantics. These types support generic math, infinities, and NaN values, and can help when you need IEEE decimal behavior instead of . +### Correctly rounded decimal and BigInteger conversions + +Conversions between and binary floating-point types, and conversions from to binary floating-point types, now round the exact source value once to the nearest representable destination value. The previous conversions could lose significant digits or round through an intermediate value, so binaries rebuilt with a .NET 11 SDK can produce different results than they did on earlier versions. There's no compatibility switch to restore the previous conversion algorithms. + +For example, converting the `double` literal `1.23` to `decimal` now preserves the exact binary floating-point value rather than producing `1.23`. If a value is meant to be decimal, use a decimal literal such as `1.23m` instead of converting a `double` literal. For complete guidance, including previous and new behavior for each conversion direction, see [Decimal and BigInteger floating-point conversions are correctly rounded](../../compatibility/core-libraries/11/decimal-biginteger-floating-point-conversions.md). + ### Partial numeric parsing adds partial parsing overloads that report consumed input. Use this API to parse delimited formats, such as CSV, so you don't copy substrings. @@ -431,10 +479,19 @@ On Windows, `Process` now uses overlapped I/O for redirected stdout/stderr, whic ### Collections improvements +- [BitArray span constructors](#bitarray-span-constructors) - [BitArray.PopCount](#bitarraypopcount) - [IReadOnlySet support in JSON serialization](#ireadonlyset-support-in-json-serialization) - [EqualityComparer\.Create](#equalitycomparertcreate) +#### BitArray span constructors + + now has constructors that accept : `ReadOnlySpan`, `ReadOnlySpan`, and `ReadOnlySpan`. You can construct a bit array directly from a slice or stack-allocated data without first allocating an array: + +:::code language="csharp" source="./snippets/csharp/Libraries.cs" id="BitArraySpanConstructor"::: + +The span-based constructors avoid the intermediate array allocation that `new BitArray(span.ToArray())` requires. + #### BitArray.PopCount The class now includes a method that returns the number of bits set to `true` in the array. This provides an efficient way to count set bits without manually iterating through the array. @@ -627,7 +684,24 @@ var context = new ValidationContext(model, serviceProvider, items: null); await Validator.ValidateObjectAsync(model, context, validateAllProperties: true); ``` -`Microsoft.Extensions.Options` gains matching support: options can be validated asynchronously, including at startup through the new `IAsyncStartupValidator`. This lets an app fail fast when an option that requires a network check is misconfigured. +`Microsoft.Extensions.Options` gains matching support: options can be validated asynchronously, including at startup through the new `IAsyncStartupValidator`. This lets an app fail fast when an option that requires a network check is misconfigured. `IStartupValidator` is now obsolete; implement `IAsyncStartupValidator` instead. + +Source-generated options validators provide a synchronous `IValidateOptions.Validate` implementation in addition to asynchronous validation, so existing synchronous validation call sites keep working alongside validators that need to await I/O: + +```csharp +public sealed class BackendOptionsValidator : IAsyncValidateOptions +{ + public async Task ValidateAsync( + string? name, BackendOptions options, CancellationToken cancellationToken = default) => + await IsReachableAsync(options.HostName, cancellationToken) + ? ValidateOptionsResult.Success + : ValidateOptionsResult.Fail($"'{options.HostName}' isn't reachable."); + + // Source-generated validators also implement this synchronous fallback. + public ValidateOptionsResult Validate(string? name, BackendOptions options) => + ValidateOptionsResult.Fail("Backend validation must run asynchronously."); +} +``` ### Activity tracing configuration @@ -663,6 +737,8 @@ It now handles relative paths, missing directories, and file systems that don't - [X25519 Diffie-Hellman key exchange](#x25519-diffie-hellman-key-exchange) - [CryptographicOperations.FixedTimeEquals overload](#cryptographicoperationsfixedtimeequals-overload) +- [AES Key Wrap](#aes-key-wrap) +- [Faster authenticated encryption on Apple platforms](#faster-authenticated-encryption-on-apple-platforms) ### X25519 Diffie-Hellman key exchange @@ -680,15 +756,32 @@ For secret-comparison scenarios where the expected value is a single known byte, bool equal = CryptographicOperations.FixedTimeEquals(receivedSpan, 0x42); ``` +### AES Key Wrap + + now supports the AES Key Wrap algorithms used by JOSE and other libraries to encrypt cryptographic keys: + +- , , , and implement the padded AES-KWP algorithm (RFC 5649). +- , , , and implement the unpadded AES Key Wrap algorithm (RFC 3394), which requires plaintext that's a multiple of 8 bytes. + +Both sets of APIs provide array-returning and span-based overloads: + +:::code language="csharp" source="./snippets/csharp/Libraries.cs" id="AesKeyWrap"::: + +### Faster authenticated encryption on Apple platforms + + and avoid passing empty associated data to CryptoKit on Apple platforms, letting the native implementation use its empty-AAD fast path. On Apple platforms version 26 and later, encryption also skips a copy that was previously required for older Foundation implementations. + ## Networking and transport security - [TLS handshake hardening](#tls-handshake-hardening) +- [Experimental caller-driven TLS sessions](#experimental-caller-driven-tls-sessions) - [HTTP request compression](#http-request-compression) - [Configurable HTTP connection eviction](#configurable-http-connection-eviction) - [DNS record resolution APIs](#dns-record-resolution-apis) - [HTTP/2 automatic downgrade for Windows authentication](#http2-automatic-downgrade-for-windows-authentication) - [QUIC stream priority](#quic-stream-priority) - [Video MIME type constants](#video-mime-type-constants) +- [HTTP metrics use observable instruments](#http-metrics-use-observable-instruments) ### TLS handshake hardening @@ -697,6 +790,17 @@ Two items improve TLS (Trans - server-side handshake bounds-checking fixes in `TlsFrameHelper` close several edge cases that could surface as `IOException` on malformed ClientHello records. - On Linux, certificate-validation failures now surface as standard TLS alerts to the peer, matching Windows behavior. Connecting clients receive an actionable handshake error instead of a connection drop. +Negotiate authentication servers can also validate TLS channel binding tokens on Unix. The managed GSSAPI path passes the channel binding data to `gss_accept_sec_context`, which rejects a mismatch in the same way as the existing Unix client path. This enables Extended Protection scenarios, such as ASP.NET Core's Negotiate authentication, that bind authentication to the underlying TLS connection. + +### Experimental caller-driven TLS sessions + +> [!WARNING] +> The `TlsContext`, `TlsSession`, `TlsBufferSession`, `TlsSocketSession`, and `TlsOperationStatus` types are experimental in .NET 11 and report diagnostic `SYSLIB5007`. + + adds a caller-driven, non-blocking TLS state machine for advanced transports where the application controls buffers and I/O scheduling. `TlsBufferSession` operates over caller-provided spans, while `TlsSocketSession` works with a `SafeSocketHandle`. + +Operations such as `Handshake`, `Read`, `Write`, `Shutdown`, and `RequestClientCertificate` return `TlsOperationStatus`, which reports whether an operation completed, needs more input, needs a larger destination buffer, or requires certificate validation or a new `TlsContext`. + ### HTTP request compression adds , , and wrappers for request bodies. These wrappers set the `Content-Encoding` header and stream compressed content as the request serializes. @@ -709,6 +813,8 @@ Two items improve TLS (Trans adds typed record-resolution APIs, including , , , , , and , together with `Async` variants. The results include records, response code, and negative-cache time-to-live (TTL) metadata through . +The new class provides the same record types through an instance API that accepts a object, which lets you supply a custom list of DNS servers instead of using the platform resolver configuration. `DnsResolver` and the static `Dns.Resolve*` methods now work on Linux in addition to Windows and macOS. + ### HTTP/2 automatic downgrade for Windows authentication automatically downgrades to HTTP/1.1 when a request requires Windows authentication (NTLM/Negotiate) over HTTP/2. The HTTP/2 specification disallows the connection-bound authentication schemes that NTLM and Kerberos rely on, so these requests previously failed. With the downgrade in place, applications targeting mixed-authentication environments—common in enterprise intranets—work without explicit `HttpRequestMessage.Version` overrides. @@ -734,6 +840,10 @@ A new c These join the existing `MediaTypeNames.Application`, `MediaTypeNames.Image`, `MediaTypeNames.Text`, and `MediaTypeNames.Multipart` classes. +### HTTP metrics use observable instruments + +The high-cardinality HTTP `open_connections` and `active_requests` metrics are now observable instruments instead of regular counters. If you use directly to read these metrics, call to receive measurements from them. + ## Unsafe API accessibility .NET 11 removes the `[RequiresUnsafe]` attribute from a large set of APIs that take pointer parameters. Previously, calling these methods from code that used `unsafe` blocks still required a project-level `true` setting because the attribute enforced that requirement independently. Now, only the standard `unsafe` block or method modifier is required. diff --git a/docs/core/whats-new/dotnet-11/overview.md b/docs/core/whats-new/dotnet-11/overview.md index 42a05a01aeea4..65b42229330d7 100644 --- a/docs/core/whats-new/dotnet-11/overview.md +++ b/docs/core/whats-new/dotnet-11/overview.md @@ -2,16 +2,16 @@ title: What's new in .NET 11 description: Learn about the new features introduced in .NET 11 for the runtime, libraries, and SDK. Also find links to what's new in other areas, such as ASP.NET Core. titleSuffix: "" -ms.date: 08/12/2026 +ms.date: 09/08/2026 ai-usage: ai-assisted ms.update-cycle: 3650-days --- # What's new in .NET 11 -This article describes new features in .NET 11. It was last updated for Preview 7. +This article describes new features in .NET 11. It was last updated for release candidate 1 (RC 1). -.NET 11 is currently in preview. The final release is expected in November 2026. You can [download .NET 11 here](https://dotnet.microsoft.com/download/dotnet/11.0). +.NET 11 is currently in release candidate. General availability is expected in November 2026. You can [download .NET 11 here](https://dotnet.microsoft.com/download/dotnet/11.0). ## .NET runtime @@ -23,9 +23,10 @@ The .NET 11 runtime includes: - Runtime Async tiered compilation, task and value-task factory intrinsics, and implicit tailcall improvements that reduce warm-up allocations and speed up common `await` paths. - JIT improvements for bounds check elimination, redundant checked context removal, devirtualization, switch expression folding, constant-folding `SequenceEqual`, and redundant branch elimination. There are also new Arm SVE2 intrinsics, improved hardware-intrinsic cost modeling, and a faster `Math.BigMul` on x64 that emits a single `MUL` instruction. - CoreCLR on WebAssembly now runs the libraries test suite end to end, and the runtime adds AVX-VNNI-512 hardware intrinsics for vectorized multiply-add workloads. -- In-process crash report logging on mobile platforms that captures the managed stack trace and runtime state before the process exits. +- In-process crash report logging that captures the managed stack trace and runtime state before the process exits, available on mobile platforms as well as Linux and macOS. - NativeAOT faster interface dispatch using a shared dispatch helper, reducing binary size at call sites and improving throughput for interface-heavy workloads. - SIMD lane construction and composition APIs (`CreateGeometricSequence`, `Zip`, `Unzip`, and the `Concat` family) across `Vector128`, `Vector256`, `Vector512`, `Vector64`, and `Vector`. +- Hardware FP16 instructions for `Half` arithmetic and conversions on x64 and Arm64. For more information, see [What's new in the .NET 11 runtime](runtime.md). @@ -33,25 +34,26 @@ For more information, see [What's new in the .NET 11 runtime](runtime.md). The .NET 11 libraries include new APIs for: -- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, and new for suspended starts and for safe process lookup. -- Compression, including improved Base64 APIs, new methods for ZIP archive entries, Zstandard compression in , and CRC32 validation when reading ZIP entries. +- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, new for suspended starts, for safe process lookup, and with for signaling processes and inspecting how they exited. +- Compression, including improved Base64 APIs, new methods for ZIP archive entries, Zstandard compression in , CRC32 validation when reading ZIP entries, and a `Reset()` method on the streamless Deflate, ZLib, and GZip encoders and decoders. - New numeric APIs, including IEEE 754 decimal floating-point types (, , and ), for delimiter-aware parsing, and generic . -- System.Text.Json improvements, including generic type info retrieval, , per-member naming policy overrides, type-level ignore conditions, F# discriminated union support, with options, `SerializeAsyncEnumerable` overloads for `PipeWriter` targets and top-level values (NDJSON) output, and serialization of C# union types. +- System.Text.Json improvements, including generic type info retrieval, , per-member naming policy overrides, type-level ignore conditions, F# discriminated union support, with options, `SerializeAsyncEnumerable` overloads for `PipeWriter` targets and top-level values (NDJSON) output, serialization of C# union types with the new `JsonUnionTypeStructuralClassifier`, built-in converters for `BFloat16` and the new decimal floating-point types, and base64 schema metadata from `JsonSchemaExporter`. - Built-in OpenTelemetry metrics for . - Discriminated-union scaffolding (`UnionAttribute` and `IUnion`) in . - Tar archive format selection and GNU sparse format 1.0 support. - `Console` support for the `FORCE_COLOR` environment variable. -- TLS handshake hardening and certificate-validation alerts on Linux. -- Networking additions, including HTTP request-body compression wrappers, configurable HTTP connection eviction, and typed DNS record resolution APIs. +- TLS handshake hardening, certificate-validation alerts on Linux, channel binding validation on Unix, and an experimental caller-driven TLS session API (`TlsBufferSession` and `TlsSocketSession`). +- Networking additions, including HTTP request-body compression wrappers, configurable HTTP connection eviction, and typed DNS record resolution APIs on Windows, Linux, and macOS through and the new class. - HTTP/2 automatic downgrade for Windows authentication. - LINQ join improvements, including `FullJoin` and tuple-returning `Join` and `GroupJoin` overloads, across , , and . -- A new class for X25519 key exchange. +- A new class for X25519 key exchange, and unpadded AES Key Wrap support (`EncryptKeyWrap`/`DecryptKeyWrap`) on . - Generic overloads on — `NextInteger` and `NextBinaryFloat` — that work with any numeric generic type. - factory method that creates a comparer from a key selector. - for HTTP/3 stream prioritization. - Video MIME type constants in . - Four new `Stream` types (`ReadOnlyMemoryStream`, `WritableMemoryStream`, `ReadOnlySequenceStream`, `StringStream`) that wrap in-memory data without copying. -- Asynchronous validation in `System.ComponentModel.DataAnnotations` via `AsyncValidationAttribute`, `IAsyncValidatableObject`, and new `Validator.ValidateObjectAsync` methods. +- constructors that accept `ReadOnlySpan`, `ReadOnlySpan`, and `ReadOnlySpan`. +- Asynchronous validation in `System.ComponentModel.DataAnnotations` via `AsyncValidationAttribute`, `IAsyncValidatableObject`, and new `Validator.ValidateObjectAsync` methods, along with asynchronous `Microsoft.Extensions.Options` validation through `IAsyncStartupValidator`. - Activity tracing configuration using rules in `Microsoft.Extensions.Diagnostics`, enabling declarative control of `Activity` tracing without wiring up `ActivityListener` instances manually. - Cross-lane vector operations including `CreateGeometricSequence`, `Zip`, `Unzip`, and the `Concat` family on `Vector128`, `Vector256`, `Vector512`, `Vector64`, and `Vector`. @@ -64,18 +66,20 @@ The .NET 11 SDK includes: - Smaller SDK installers on Linux and macOS through assembly deduplication, with additional savings by skipping crossgen for `DotnetTools`-only assemblies. - Improved [CA1873](../../../fundamentals/code-analysis/quality-rules/ca1873.md) code analyzer with reduced noise and clearer diagnostic messages. - Support for creating and editing solution filters (`.slnf`) from the `dotnet sln` CLI. -- File-based app support for `#:include` to split apps across multiple files, and `#:include ./libs/MyLib.dll` to include compiled DLL references directly. +- File-based app support for `#:include` to split apps across multiple files and to include compiled DLL references directly, plus Native AOT build-output reuse and `dotnet format` support for file-based programs. - A new `dotnet run -e` option to pass environment variables from the command line. - `dotnet watch` improvements, including Aspire app-host integration, automatic crash recovery, and device selection for MAUI and mobile projects. - OpenTelemetry replaces Application Insights for CLI telemetry. - NativeAOT CLI entry point that serves the full command surface—including `--help` for all built-in commands and tool/external-command launches—out-of-process from the AOT path, skipping managed CLI startup. - NativeAOT CLI and the MSBuild server are now enabled by default. - `dotnet test` improvements, including `--no-dependencies`, `DOTNET_TEST_RUNNER` environment variable, `--use-current-runtime`, `--test-modules` exclusion patterns, per-assembly test counts, and live display of in-flight tests. -- Additional `dotnet test` improvements include run-level `--timeout` and `--maximum-failed-tests`, traversal-project support, JSON output for `--list-tests`, and artifact post-processing for multi-module runs. +- `dotnet test` support for Android, iOS, macOS, and Mac Catalyst test projects, with device selection and new `androidtest`, `iostest`, `macostest`, and `maccatalysttest` templates. +- Additional `dotnet test` run-level options, including `--timeout`, `--maximum-failed-tests`, `--results-directory-layout per-module`, and an experimental affected-test workflow, along with traversal-project support, JSON output for `--list-tests`, and artifact post-processing for multi-module runs. - Built-in test templates support xUnit v3 (defaulting to Microsoft.Testing.Platform) and NUnit with an opt-in `--test-runner` option. - Multi-architecture container image builds with Podman using the SDK's container publishing support. -- Container publishing now prefers platform-native local runtimes (`wslc` on Windows and `container` on macOS) before Docker and Podman. +- Container publishing now prefers platform-native local runtimes (`wslc` on Windows and `container` on macOS) before Docker and Podman, produces reproducible image digests through `SOURCE_DATE_EPOCH`, and skips redundant layer uploads when the target manifest already exists. - TypeScript compilation outputs from Razor Class Libraries now integrate correctly with the Static Web Assets pipeline. +- `dotnet format` limits `.editorconfig` discovery in folder mode to the ancestor directories of included files. - The `dotnet` CLI no longer suppresses the MSBuild build server when `DOTNET_CLI_USE_MSBUILD_SERVER` is unset, and the OTLP telemetry exporter activates on any standard `OTEL_EXPORTER_OTLP_*` environment variable. For more information, see [What's new in the SDK for .NET 11](sdk.md). @@ -86,7 +90,7 @@ For information about what's new in ASP.NET Core, see [What's new in ASP.NET Cor ## C# 15 -C# 15 includes these features: +C# 15 is the default language version for projects that target .NET 11 and includes these features: - [Collection expression arguments](../../../csharp/whats-new/csharp-15.md#collection-expression-arguments) - [Union types](../../../csharp/whats-new/csharp-15.md#union-types) diff --git a/docs/core/whats-new/dotnet-11/runtime.md b/docs/core/whats-new/dotnet-11/runtime.md index 73ab4e7e7fc86..39a93b670679f 100644 --- a/docs/core/whats-new/dotnet-11/runtime.md +++ b/docs/core/whats-new/dotnet-11/runtime.md @@ -2,14 +2,14 @@ title: What's new in .NET 11 runtime description: Learn about the new features introduced in the .NET 11 runtime. titleSuffix: "" -ms.date: 08/15/2026 +ms.date: 09/08/2026 ai-usage: ai-assisted ms.update-cycle: 3650-days --- # What's new in the .NET 11 runtime -This article describes new features in the .NET runtime for .NET 11. It was last updated for Preview 7. +This article describes new features in the .NET runtime for .NET 11. It was last updated for release candidate 1 (RC 1). ## Updated minimum hardware requirements @@ -239,7 +239,7 @@ These optimizations are most visible after inlining, where guards from different .NET 11 includes several new hardware intrinsics and code generation improvements: -- **F16C acceleration for `Half` ↔ `float` conversions on x64:** When the CPU supports F16C (most AVX2-capable hardware), conversions between and `float`/`double` now use the dedicated `vcvtph2ps`/`vcvtps2ph` instructions instead of helper calls. +- **Hardware FP16 instructions for `Half` arithmetic and conversions:** The JIT uses hardware FP16 instructions for arithmetic and conversions when the processor supports them. On x64, arithmetic uses AVX10.1, while conversions between `Half` and `float` can use F16C (available on most AVX2-capable hardware). On Arm64, arithmetic uses the optional FP16 instruction set, while conversions between `Half` and `float` or `double` use baseline Arm64 instructions. The optimization requires no application changes and preserves the existing ABI representation of `Half`. - **Better cost modeling for x86/x64 SIMD:** The JIT's floating-point execution and size costs previously reflected x87-era assumptions. Updated costs that reflect modern SSE/AVX hardware let the JIT make better decisions about hoisting and common subexpression elimination (CSE) around SIMD code. - **Faster `DotProduct` on AVX:** Lowering for `Vector128.Dot`-style operations now emits a `mul + permute + add` sequence instead of `vdpps`/`vdppd` when AVX is available, which is consistently faster. - **Faster `IndexOfAnyAsciiSearcher` on Arm64:** Arm64 versions of `Vector*.Count`, `IndexOf`, and `LastIndexOf` no longer route through `ExtractMostSignificantBits`, yielding a 5–50% improvement in workloads that use these APIs in their core loop. @@ -282,7 +282,7 @@ The .NET runtime can now initialize on machines with more than 1024 logical proc A new in-process crash reporting mechanism captures diagnostic information from within the crashing process before it terminates. Previously, crash diagnostics were collected by an out-of-process monitor. While the out-of-process approach is safe, it can miss information that's only available inside the dying process. The new in-process path logs the managed stack trace, module list, and key runtime state to a well-known path before the process exits. -This capability is specific to mobile platforms. +This capability originated on mobile platforms and is now also available on Linux and macOS. When `DOTNET_DbgEnableMiniDump` isn't enabled, set `DOTNET_EnableCrashReport=1` or `DOTNET_EnableCrashReportOnly=1` to select the in-process reporter. Existing `createdump` behavior remains in place when minidumps are enabled. ## NativeAOT: faster interface dispatch diff --git a/docs/core/whats-new/dotnet-11/sdk.md b/docs/core/whats-new/dotnet-11/sdk.md index 5348c3f697f88..8c7420b6a43c7 100644 --- a/docs/core/whats-new/dotnet-11/sdk.md +++ b/docs/core/whats-new/dotnet-11/sdk.md @@ -2,14 +2,14 @@ title: What's new in the SDK and tooling for .NET 11 description: Learn about the new .NET SDK features introduced in .NET 11. titleSuffix: "" -ms.date: 08/12/2026 +ms.date: 09/08/2026 ai-usage: ai-assisted ms.update-cycle: 3650-days --- # What's new in the SDK and tooling for .NET 11 -This article describes new features and enhancements in the .NET SDK for .NET 11. It was last updated for Preview 7. You can [download .NET 11 here](https://dotnet.microsoft.com/download/dotnet/11.0). +This article describes new features and enhancements in the .NET SDK for .NET 11. It was last updated for release candidate 1 (RC 1). You can [download .NET 11 here](https://dotnet.microsoft.com/download/dotnet/11.0). ## SDK footprint @@ -91,12 +91,14 @@ The pack operation still proceeds with a warning to avoid breaking existing proj - [Solution filter CLI support](#solution-filter-cli-support) - [File-based apps split across files](#file-based-apps-split-across-files) +- [File-based programs reuse Native AOT build outputs](#file-based-programs-reuse-native-aot-build-outputs) - [Pass environment variables with dotnet run](#pass-environment-variables-with-dotnet-run) - [dotnet watch improvements](#dotnet-watch-improvements) - [Fish shell completions](#fish-shell-completions) - [dotnet reference falls back to current directory](#dotnet-reference-falls-back-to-current-directory) - [dotnet reference support for file-based apps](#dotnet-reference-support-for-file-based-apps) - [Launch settings notice moved to stderr](#launch-settings-notice-moved-to-stderr) +- [dotnet format limits configuration discovery to included files](#dotnet-format-limits-configuration-discovery-to-included-files) - [Other CLI improvements](#other-cli-improvements) ### Solution filter CLI support @@ -121,6 +123,18 @@ File-based apps now support an `#:include` directive, so you can move shared hel Console.WriteLine(Helpers.FormatOutput(new Customer())); ``` +### File-based programs reuse Native AOT build outputs + +The Native AOT command-line path can reuse existing build outputs when it runs an unchanged file-based program. Supported cached launches include `dotnet run --file app.cs`, `dotnet run app.cs`, and `dotnet app.cs`. If the cached output doesn't match the current command arguments, the CLI falls back to the managed path. + +`dotnet format` also accepts a file-based program: + +```console +dotnet format app.cs +``` + +When a repository enables the SDK artifacts layout, file-based program outputs are placed under that repository's artifacts directory instead of the default per-user cache. + ### Pass environment variables with dotnet run `dotnet run -e KEY=VALUE` passes environment variables to the launched app from the command line, without requiring you to export shell state or edit launch profiles: @@ -180,6 +194,16 @@ Previously, these commands failed with `Could not find project or directory ''` The "Using launch settings from..." informational message now writes to `stderr` instead of `stdout`. Scripts that capture the standard output of `dotnet run` no longer need to strip this line out. +### dotnet format limits configuration discovery to included files + +In folder mode, `dotnet format` now finds `.editorconfig` files by walking the ancestor directories of files that will actually be formatted. It no longer scans unrelated subtrees, such as large `node_modules` directories: + +```console +dotnet format whitespace . --folder --include src/App/Program.cs +``` + +In one monorepo benchmark, formatting one included file improved from 1.09 seconds to 0.55 seconds. Use `.globalconfig`, rather than an `is_global = true` `.editorconfig` in an unrelated subtree, for configuration that must apply globally. + ### Other CLI improvements - `dotnet format` now accepts `--framework` for multi-targeted projects. @@ -187,6 +211,10 @@ The "Using launch settings from..." informational message now writes to `stderr` - `dotnet tool exec` and `dnx` no longer prompt for an extra approval when running tools. - `dotnet nuget --help` now correctly forwards to the NuGet CLI's help output instead of falling back to generic help. - `dotnet publish` no longer removes native DLLs on subsequent runs of single-file publish. +- `dotnet new install --prerelease` selects the latest available version, including prerelease versions, when a template package version isn't specified explicitly. An explicit package version, such as `Contoso.Templates@2.0.0-preview.3`, continues to select that exact version. +- Workload operations and `global.json` now detect versions written in the internal NuGet package format and report the corrected user-facing format instead of a package-not-found error. +- The `Configuration` environment variable now supplies the default value for the shared `--configuration`/`-c` CLI options across commands. An explicit command-line option still takes precedence, and empty or whitespace-only environment values are ignored. +- File-based property directives no longer permit `:` in the property name. Replace syntax such as `#:property Foo:Bar=value` with a valid MSBuild property name. ## Web assets and telemetry @@ -235,6 +263,7 @@ A new MSBuild property lets upstack tooling (for example, `dotnet/macios` and `d ## Test improvements - [dotnet test improvements](#dotnet-test-improvements) +- [dotnet test support for mobile app testing](#dotnet-test-support-for-mobile-app-testing) - [dotnet test run-level policy options](#dotnet-test-run-level-policy-options) - [dotnet test support for traversal projects](#dotnet-test-support-for-traversal-projects) - [dotnet test reporter and artifacts improvements](#dotnet-test-reporter-and-artifacts-improvements) @@ -252,16 +281,63 @@ A new MSBuild property lets upstack tooling (for example, `dotnet/macios` and `d - **Terminal logger arguments**: `--tl`, `--terminallogger`, and `--tlp` are now forwarded to MSBuild instead of being passed as test application arguments. - **Live display of in-flight tests**: The progress area shows tests that are running, using a new `TestInProgressMessages` IPC event. The panel keeps per-assembly trimming for large parallel runs and is enabled only for interactive ANSI terminals. - **Two-stage Ctrl+C cancellation**: The first press stops scheduling new test apps and shows a hint; the second press force-kills all child test processes. -- **`--device` for MAUI**: Select a device per target framework when running tests for .NET MAUI projects. - **Protocol 1.1.0 output forwarding**: When the test host supports protocol 1.1.0, stdout/stderr and `IOutputDevice` messages are streamed live through the terminal reporter instead of being shown only on failure. +### dotnet test support for mobile app testing + +The Microsoft Testing Platform path for `dotnet test` supports test projects that target Android, iOS, macOS, and Mac Catalyst. For Android and iOS, it can select connected devices, emulators, or simulators. Use `--device` to select a device per target framework, or let `dotnet test` auto-select when only one is available. + +The workloads include test project templates for Android (`dotnet new androidtest`), iOS (`dotnet new iostest`), macOS (`dotnet new macostest`), and Mac Catalyst (`dotnet new maccatalysttest`). They use MSTest by default, but you can configure another framework supported by [Microsoft.Testing.Platform](../../testing/microsoft-testing-platform-intro.md#supported-test-frameworks). + +`dotnet test -bl` records device selection, deployment, and run-argument builds in one coherent binary log, and `dotnet test` reports the underlying MSBuild errors when deployment or run-argument discovery fails. + ### dotnet test run-level policy options -`dotnet test` now supports run-level `--timeout` and `--maximum-failed-tests` options in Microsoft Testing Platform mode. These options let you stop long or noisy runs consistently across multi-project executions. +The Microsoft Testing Platform path for `dotnet test` adds options that apply to the complete run rather than to each test application. Place these options before `--`; options after `--` continue to be forwarded to each application. + +```console +# Stop the complete run after 90 seconds. +dotnet test --timeout 90s + +# Stop after five failed, errored, timed-out, or cancelled results. +dotnet test --maximum-failed-tests 5 +``` + +`--timeout` accepts `ms`, `s`, and `m` suffixes and counts time only while at least one test application is running. A timeout returns exit code 3, while `--maximum-failed-tests` returns exit code 13 when its limit is reached. + +For solution and multi-targeted runs, the `--results-directory-layout per-module` option gives every test application a separate output directory, preventing reports with the same relative file name from overwriting one another. The default remains `flat`. + +```console +dotnet test --results-directory-layout per-module +``` + +```text +TestResults/ + MyTests/ + net11.0_x64/ + OtherTests/ + net11.0_x64/ +``` + +When the SDK's artifacts output layout is enabled, MTP test reports, coverage, and diagnostics default to `/test//`. An explicit `--results-directory` or `--results-directory-layout` still takes precedence. + +`dotnet test --nologo` maps to Microsoft.Testing.Platform's `--no-banner` option, and `--no-banner` appears in the command help. + +An experimental affected-test workflow is also available through a separately distributed Microsoft.Testing.Platform extension. It can collect a repository's test map and then run only the tests affected by a change. Collection and affected-test selection are mutually exclusive and can't be combined with device testing, parallel modules, or minimum-test policies. + +```powershell +$env:DOTNET_CLI_ENABLE_AFFECTED_TESTS = "1" +dotnet test --collect-test-map +dotnet test --affected-tests +``` ### dotnet test support for traversal projects -`dotnet test` now supports `Microsoft.Build.Traversal` projects. The SDK expands traversal graphs, deduplicates repeated references, and executes tests for the aggregated project set. +`dotnet test` now supports `Microsoft.Build.Traversal` projects. The SDK recursively expands nested traversal projects, deduplicates diamond references, and honors `Configuration` and `Platform` metadata on project references before executing tests for the aggregated project set. + +```console +dotnet test dirs.proj +``` ### dotnet test reporter and artifacts improvements @@ -288,6 +364,7 @@ Both options are available for C#, F#, and VB templates. - [Multi-arch container builds with Podman](#multi-arch-container-builds-with-podman) - [Platform-native local container runtime selection](#platform-native-local-container-runtime-selection) +- [Reproducible container publishing](#reproducible-container-publishing) - [TypeScript outputs integrate with Static Web Assets](#typescript-outputs-integrate-with-static-web-assets) - [MSBuild server and OpenTelemetry environment variables](#msbuild-server-and-opentelemetry-environment-variables) @@ -299,6 +376,18 @@ The SDK's built-in container publishing now supports building multi-architecture Container publishing now prefers platform-native local runtimes when available: `wslc` on Windows, and `container` on macOS. Docker and Podman remain fallbacks. To force a runtime, set `LocalRegistry` explicitly in your project or publish profile. +### Reproducible container publishing + +Publishing the same application more than once could previously produce different container image digests, because timestamps, archive headers, and directory enumeration order varied between builds. Set `SOURCE_DATE_EPOCH` to a stable Unix timestamp so independent publishes of the same inputs produce the same digest: + +```bash +dotnet publish /t:PublishContainer \ + -p:ContainerRegistry=registry.example.com \ + -p:SOURCE_DATE_EPOCH="$(git log -1 --pretty=%ct)" +``` + +Remote registry publishes also check whether the computed image manifest already exists in the destination repository. When it does, the SDK skips processing the layers and configuration while still applying every requested image tag. This optimization is enabled by default; set `ContainerPushNoCache=true` to bypass the manifest-level check. The SDK still checks each layer and configuration blob and doesn't upload blobs that are already present. + ### TypeScript outputs integrate with Static Web Assets Projects that use `Microsoft.TypeScript.MSBuild` in Razor Class Libraries now properly integrate TypeScript compilation outputs with ASP.NET Core Static Web Assets. The new integration hooks TypeScript outputs into the Static Web Assets pipeline after compilation, enabling compression, fingerprinting, and correct rebuild behavior. Previously, rebuild operations could fail because TypeScript outputs were discovered before compilation or stale references persisted after clean. diff --git a/docs/core/whats-new/dotnet-11/snippets/csharp/Libraries.cs b/docs/core/whats-new/dotnet-11/snippets/csharp/Libraries.cs index 11d085a401e68..43eef5796ec08 100644 --- a/docs/core/whats-new/dotnet-11/snippets/csharp/Libraries.cs +++ b/docs/core/whats-new/dotnet-11/snippets/csharp/Libraries.cs @@ -1,9 +1,12 @@ using System.Buffers; +using System.Collections; using System.Diagnostics; using System.Formats.Tar; using System.Globalization; using System.IO.Compression; using System.IO.Pipelines; +using System.Numerics; +using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Text; using System.Text.Json; @@ -27,6 +30,19 @@ static async Task ProcessRunAndCaptureExample() // } + static async Task ProcessSignalExample() + { + // + if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()) + { + using Process process = Process.Start("sleep", "30")!; + process.Signal(PosixSignal.SIGTERM); + ProcessExitStatus status = await process.WaitForExitStatusAsync(); + Console.WriteLine(status); + } + // + } + static void ZLibEncoderSpanExample() { // @@ -220,6 +236,18 @@ public static void LinqJoinsExample() // } + static void BitArraySpanConstructorExample() + { + // + Span bytes = stackalloc byte[] { 0b_0000_0011, 0b_1000_0000 }; + var bits = new BitArray(bytes); + + Console.WriteLine(bits[0]); // True + Console.WriteLine(bits[1]); // True + Console.WriteLine(bits[15]); // True + // + } + static void EqualityComparerCreateExample() { // @@ -296,6 +324,29 @@ await JsonSerializer.SerializeAsyncEnumerable( // } + static void JsonNumericTypesExample() + { + // + var measurement = new Measurement((Decimal64)1.229m); + string json = JsonSerializer.Serialize(measurement); + Console.WriteLine(json); // {"Voltage":1.229} + + Measurement? roundTripped = JsonSerializer.Deserialize(json); + Console.WriteLine(roundTripped); // Measurement { Voltage = 1.229 } + // + } + + static void JsonUnionStructuralClassifierExample() + { + // + PetUnion? pet = JsonSerializer.Deserialize( + """{"Name":"Misty","Lives":9}""", + PetJsonContext.Default.PetUnion); + + Console.WriteLine(pet?.Value is Cat); // True + // + } + static void X25519KeyExchangeExample() { // @@ -312,6 +363,27 @@ static void X25519KeyExchangeExample() // } + static void AesKeyWrapExample() + { + // + using Aes aes = Aes.Create(); + aes.Key = RandomNumberGenerator.GetBytes(32); // AES-256 key-encryption key + + byte[] keyToWrap = RandomNumberGenerator.GetBytes(24); // Multiple of 8 bytes + + // Unpadded AES Key Wrap (RFC 3394) + byte[] wrapped = aes.EncryptKeyWrap(keyToWrap); + byte[] unwrapped = aes.DecryptKeyWrap(wrapped); + Console.WriteLine(keyToWrap.SequenceEqual(unwrapped)); // True + + // Padded AES-KWP (RFC 5649) accepts a plaintext of any length + byte[] arbitraryLengthKey = RandomNumberGenerator.GetBytes(19); + byte[] wrappedPadded = aes.EncryptKeyWrapPadded(arbitraryLengthKey); + byte[] unwrappedPadded = aes.DecryptKeyWrapPadded(wrappedPadded); + Console.WriteLine(arbitraryLengthKey.SequenceEqual(unwrappedPadded)); // True + // + } + static void NullableUnderlyingTypeExample() { // @@ -335,3 +407,15 @@ sealed class EventData public string? Notes { get; set; } } + +readonly record struct Measurement(Decimal64 Voltage); + +[JsonUnion(TypeClassifier = typeof(JsonUnionTypeStructuralClassifier))] +public union PetUnion(Dog, Cat); + +public sealed record Dog(string Name, string Breed); + +public sealed record Cat(string Name, int Lives); + +[JsonSerializable(typeof(PetUnion))] +internal partial class PetJsonContext : JsonSerializerContext; From 20dd714756e672fe32db471c0ecbe13ff521e0ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 18:52:24 +0000 Subject: [PATCH 3/7] Fix unresolved .NET 11 API links Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/whats-new/dotnet-11/libraries.md | 8 ++++---- docs/core/whats-new/dotnet-11/overview.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/core/whats-new/dotnet-11/libraries.md b/docs/core/whats-new/dotnet-11/libraries.md index 9087ba9509389..78f3f21019c50 100644 --- a/docs/core/whats-new/dotnet-11/libraries.md +++ b/docs/core/whats-new/dotnet-11/libraries.md @@ -75,8 +75,8 @@ process.SafeHandle.Resume(); exposes process signaling and exit-status APIs directly, without requiring you to work through : -- sends a POSIX signal to the process. -- , , and return a , which distinguishes a normal exit from a signal-based termination. +- [`Process.Signal`](/dotnet/api/system.diagnostics.process.signal?view=net-11.0) sends a POSIX signal to the process. +- [`Process.WaitForExitStatus`](/dotnet/api/system.diagnostics.process.waitforexitstatus?view=net-11.0), [`Process.TryWaitForExitStatus`](/dotnet/api/system.diagnostics.process.trywaitforexitstatus?view=net-11.0), and [`Process.WaitForExitStatusAsync`](/dotnet/api/system.diagnostics.process.waitforexitstatusasync?view=net-11.0) return a , which distinguishes a normal exit from a signal-based termination. :::code language="csharp" source="./snippets/csharp/Libraries.cs" id="ProcessSignal"::: @@ -266,7 +266,7 @@ For a union with object-shaped cases, the built-in `JsonUnionTypeStructuralClass adds so the serializer can infer polymorphic metadata for C# closed hierarchies without requiring explicit annotations on each base type. Explicit registrations still take precedence. -You can also opt a single closed hierarchy in to this behavior with , without changing the application-wide `JsonSerializerOptions` setting: +You can also opt a single closed hierarchy in to this behavior with [`JsonPolymorphicAttribute.InferClosedTypePolymorphism`](/dotnet/api/system.text.json.serialization.jsonpolymorphicattribute.inferclosedtypepolymorphism?view=net-11.0), without changing the application-wide `JsonSerializerOptions` setting: ```csharp [JsonPolymorphic(InferClosedTypePolymorphism = true)] @@ -761,7 +761,7 @@ bool equal = CryptographicOperations.FixedTimeEquals(receivedSpan, 0x42); now supports the AES Key Wrap algorithms used by JOSE and other libraries to encrypt cryptographic keys: - , , , and implement the padded AES-KWP algorithm (RFC 5649). -- , , , and implement the unpadded AES Key Wrap algorithm (RFC 3394), which requires plaintext that's a multiple of 8 bytes. +- [`Aes.EncryptKeyWrap`](/dotnet/api/system.security.cryptography.aes.encryptkeywrap?view=net-11.0), [`Aes.DecryptKeyWrap`](/dotnet/api/system.security.cryptography.aes.decryptkeywrap?view=net-11.0), [`Aes.TryDecryptKeyWrap`](/dotnet/api/system.security.cryptography.aes.trydecryptkeywrap?view=net-11.0), and [`Aes.GetKeyWrapLength`](/dotnet/api/system.security.cryptography.aes.getkeywraplength?view=net-11.0) implement the unpadded AES Key Wrap algorithm (RFC 3394), which requires plaintext that's a multiple of 8 bytes. Both sets of APIs provide array-returning and span-based overloads: diff --git a/docs/core/whats-new/dotnet-11/overview.md b/docs/core/whats-new/dotnet-11/overview.md index 65b42229330d7..c6213fcd45f80 100644 --- a/docs/core/whats-new/dotnet-11/overview.md +++ b/docs/core/whats-new/dotnet-11/overview.md @@ -34,7 +34,7 @@ For more information, see [What's new in the .NET 11 runtime](runtime.md). The .NET 11 libraries include new APIs for: -- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, new for suspended starts, for safe process lookup, and with for signaling processes and inspecting how they exited. +- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, new for suspended starts, for safe process lookup, and [`Process.Signal`](/dotnet/api/system.diagnostics.process.signal?view=net-11.0) with for signaling processes and inspecting how they exited. - Compression, including improved Base64 APIs, new methods for ZIP archive entries, Zstandard compression in , CRC32 validation when reading ZIP entries, and a `Reset()` method on the streamless Deflate, ZLib, and GZip encoders and decoders. - New numeric APIs, including IEEE 754 decimal floating-point types (, , and ), for delimiter-aware parsing, and generic . - System.Text.Json improvements, including generic type info retrieval, , per-member naming policy overrides, type-level ignore conditions, F# discriminated union support, with options, `SerializeAsyncEnumerable` overloads for `PipeWriter` targets and top-level values (NDJSON) output, serialization of C# union types with the new `JsonUnionTypeStructuralClassifier`, built-in converters for `BFloat16` and the new decimal floating-point types, and base64 schema metadata from `JsonSchemaExporter`. From d4d409e95d08ebb20bb17905f5ba974d0e737fc6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 19:13:02 +0000 Subject: [PATCH 4/7] Remove unpublished RC 1 API links Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/whats-new/dotnet-11/libraries.md | 8 ++++---- docs/core/whats-new/dotnet-11/overview.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/core/whats-new/dotnet-11/libraries.md b/docs/core/whats-new/dotnet-11/libraries.md index 78f3f21019c50..a52622eec4dc3 100644 --- a/docs/core/whats-new/dotnet-11/libraries.md +++ b/docs/core/whats-new/dotnet-11/libraries.md @@ -75,8 +75,8 @@ process.SafeHandle.Resume(); exposes process signaling and exit-status APIs directly, without requiring you to work through : -- [`Process.Signal`](/dotnet/api/system.diagnostics.process.signal?view=net-11.0) sends a POSIX signal to the process. -- [`Process.WaitForExitStatus`](/dotnet/api/system.diagnostics.process.waitforexitstatus?view=net-11.0), [`Process.TryWaitForExitStatus`](/dotnet/api/system.diagnostics.process.trywaitforexitstatus?view=net-11.0), and [`Process.WaitForExitStatusAsync`](/dotnet/api/system.diagnostics.process.waitforexitstatusasync?view=net-11.0) return a , which distinguishes a normal exit from a signal-based termination. +- `Process.Signal` sends a POSIX signal to the process. +- `Process.WaitForExitStatus`, `Process.TryWaitForExitStatus`, and `Process.WaitForExitStatusAsync` return a , which distinguishes a normal exit from a signal-based termination. :::code language="csharp" source="./snippets/csharp/Libraries.cs" id="ProcessSignal"::: @@ -266,7 +266,7 @@ For a union with object-shaped cases, the built-in `JsonUnionTypeStructuralClass adds so the serializer can infer polymorphic metadata for C# closed hierarchies without requiring explicit annotations on each base type. Explicit registrations still take precedence. -You can also opt a single closed hierarchy in to this behavior with [`JsonPolymorphicAttribute.InferClosedTypePolymorphism`](/dotnet/api/system.text.json.serialization.jsonpolymorphicattribute.inferclosedtypepolymorphism?view=net-11.0), without changing the application-wide `JsonSerializerOptions` setting: +You can also opt a single closed hierarchy in to this behavior with `JsonPolymorphicAttribute.InferClosedTypePolymorphism`, without changing the application-wide `JsonSerializerOptions` setting: ```csharp [JsonPolymorphic(InferClosedTypePolymorphism = true)] @@ -761,7 +761,7 @@ bool equal = CryptographicOperations.FixedTimeEquals(receivedSpan, 0x42); now supports the AES Key Wrap algorithms used by JOSE and other libraries to encrypt cryptographic keys: - , , , and implement the padded AES-KWP algorithm (RFC 5649). -- [`Aes.EncryptKeyWrap`](/dotnet/api/system.security.cryptography.aes.encryptkeywrap?view=net-11.0), [`Aes.DecryptKeyWrap`](/dotnet/api/system.security.cryptography.aes.decryptkeywrap?view=net-11.0), [`Aes.TryDecryptKeyWrap`](/dotnet/api/system.security.cryptography.aes.trydecryptkeywrap?view=net-11.0), and [`Aes.GetKeyWrapLength`](/dotnet/api/system.security.cryptography.aes.getkeywraplength?view=net-11.0) implement the unpadded AES Key Wrap algorithm (RFC 3394), which requires plaintext that's a multiple of 8 bytes. +- `Aes.EncryptKeyWrap`, `Aes.DecryptKeyWrap`, `Aes.TryDecryptKeyWrap`, and `Aes.GetKeyWrapLength` implement the unpadded AES Key Wrap algorithm (RFC 3394), which requires plaintext that's a multiple of 8 bytes. Both sets of APIs provide array-returning and span-based overloads: diff --git a/docs/core/whats-new/dotnet-11/overview.md b/docs/core/whats-new/dotnet-11/overview.md index c6213fcd45f80..5ffccb3b9ada4 100644 --- a/docs/core/whats-new/dotnet-11/overview.md +++ b/docs/core/whats-new/dotnet-11/overview.md @@ -34,7 +34,7 @@ For more information, see [What's new in the .NET 11 runtime](runtime.md). The .NET 11 libraries include new APIs for: -- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, new for suspended starts, for safe process lookup, and [`Process.Signal`](/dotnet/api/system.diagnostics.process.signal?view=net-11.0) with for signaling processes and inspecting how they exited. +- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, new for suspended starts, for safe process lookup, and `Process.Signal` with for signaling processes and inspecting how they exited. - Compression, including improved Base64 APIs, new methods for ZIP archive entries, Zstandard compression in , CRC32 validation when reading ZIP entries, and a `Reset()` method on the streamless Deflate, ZLib, and GZip encoders and decoders. - New numeric APIs, including IEEE 754 decimal floating-point types (, , and ), for delimiter-aware parsing, and generic . - System.Text.Json improvements, including generic type info retrieval, , per-member naming policy overrides, type-level ignore conditions, F# discriminated union support, with options, `SerializeAsyncEnumerable` overloads for `PipeWriter` targets and top-level values (NDJSON) output, serialization of C# union types with the new `JsonUnionTypeStructuralClassifier`, built-in converters for `BFloat16` and the new decimal floating-point types, and base64 schema metadata from `JsonSchemaExporter`. From 43fad91bceee822fab4f02a09af53900f272d277 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 19:18:37 +0000 Subject: [PATCH 5/7] Enable preview syntax for .NET 11 snippets Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/whats-new/dotnet-11/snippets/csharp/snippets.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/core/whats-new/dotnet-11/snippets/csharp/snippets.csproj b/docs/core/whats-new/dotnet-11/snippets/csharp/snippets.csproj index 9a2f201832202..366f9210ff13d 100644 --- a/docs/core/whats-new/dotnet-11/snippets/csharp/snippets.csproj +++ b/docs/core/whats-new/dotnet-11/snippets/csharp/snippets.csproj @@ -4,6 +4,7 @@ net11.0 exe enable + preview enable false From 103ab950ef2a131c6165b14f896b9b91b170b3e0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 19:35:12 +0000 Subject: [PATCH 6/7] Use file-based app terminology Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/whats-new/dotnet-11/overview.md | 2 +- docs/core/whats-new/dotnet-11/sdk.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/core/whats-new/dotnet-11/overview.md b/docs/core/whats-new/dotnet-11/overview.md index 5ffccb3b9ada4..662b07bdf6885 100644 --- a/docs/core/whats-new/dotnet-11/overview.md +++ b/docs/core/whats-new/dotnet-11/overview.md @@ -66,7 +66,7 @@ The .NET 11 SDK includes: - Smaller SDK installers on Linux and macOS through assembly deduplication, with additional savings by skipping crossgen for `DotnetTools`-only assemblies. - Improved [CA1873](../../../fundamentals/code-analysis/quality-rules/ca1873.md) code analyzer with reduced noise and clearer diagnostic messages. - Support for creating and editing solution filters (`.slnf`) from the `dotnet sln` CLI. -- File-based app support for `#:include` to split apps across multiple files and to include compiled DLL references directly, plus Native AOT build-output reuse and `dotnet format` support for file-based programs. +- File-based app support for `#:include` to split apps across multiple files and to include compiled DLL references directly, plus Native AOT build-output reuse and `dotnet format` support for file-based apps. - A new `dotnet run -e` option to pass environment variables from the command line. - `dotnet watch` improvements, including Aspire app-host integration, automatic crash recovery, and device selection for MAUI and mobile projects. - OpenTelemetry replaces Application Insights for CLI telemetry. diff --git a/docs/core/whats-new/dotnet-11/sdk.md b/docs/core/whats-new/dotnet-11/sdk.md index 8c7420b6a43c7..365ecd8c645aa 100644 --- a/docs/core/whats-new/dotnet-11/sdk.md +++ b/docs/core/whats-new/dotnet-11/sdk.md @@ -91,7 +91,7 @@ The pack operation still proceeds with a warning to avoid breaking existing proj - [Solution filter CLI support](#solution-filter-cli-support) - [File-based apps split across files](#file-based-apps-split-across-files) -- [File-based programs reuse Native AOT build outputs](#file-based-programs-reuse-native-aot-build-outputs) +- [File-based apps reuse Native AOT build outputs](#file-based-apps-reuse-native-aot-build-outputs) - [Pass environment variables with dotnet run](#pass-environment-variables-with-dotnet-run) - [dotnet watch improvements](#dotnet-watch-improvements) - [Fish shell completions](#fish-shell-completions) @@ -123,17 +123,17 @@ File-based apps now support an `#:include` directive, so you can move shared hel Console.WriteLine(Helpers.FormatOutput(new Customer())); ``` -### File-based programs reuse Native AOT build outputs +### File-based apps reuse Native AOT build outputs -The Native AOT command-line path can reuse existing build outputs when it runs an unchanged file-based program. Supported cached launches include `dotnet run --file app.cs`, `dotnet run app.cs`, and `dotnet app.cs`. If the cached output doesn't match the current command arguments, the CLI falls back to the managed path. +The Native AOT command-line path can reuse existing build outputs when it runs an unchanged file-based app. Supported cached launches include `dotnet run --file app.cs`, `dotnet run app.cs`, and `dotnet app.cs`. If the cached output doesn't match the current command arguments, the CLI falls back to the managed path. -`dotnet format` also accepts a file-based program: +`dotnet format` also accepts a file-based app: ```console dotnet format app.cs ``` -When a repository enables the SDK artifacts layout, file-based program outputs are placed under that repository's artifacts directory instead of the default per-user cache. +When a repository enables the SDK artifacts layout, file-based app outputs are placed under that repository's artifacts directory instead of the default per-user cache. ### Pass environment variables with dotnet run From 47972c5e4601a79faf755d98fae5f92ef1bed2fc Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 9 Sep 2026 11:08:16 -0700 Subject: [PATCH 7/7] use xrefs --- docs/core/whats-new/dotnet-11/libraries.md | 8 ++++---- docs/core/whats-new/dotnet-11/overview.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/core/whats-new/dotnet-11/libraries.md b/docs/core/whats-new/dotnet-11/libraries.md index a52622eec4dc3..9087ba9509389 100644 --- a/docs/core/whats-new/dotnet-11/libraries.md +++ b/docs/core/whats-new/dotnet-11/libraries.md @@ -75,8 +75,8 @@ process.SafeHandle.Resume(); exposes process signaling and exit-status APIs directly, without requiring you to work through : -- `Process.Signal` sends a POSIX signal to the process. -- `Process.WaitForExitStatus`, `Process.TryWaitForExitStatus`, and `Process.WaitForExitStatusAsync` return a , which distinguishes a normal exit from a signal-based termination. +- sends a POSIX signal to the process. +- , , and return a , which distinguishes a normal exit from a signal-based termination. :::code language="csharp" source="./snippets/csharp/Libraries.cs" id="ProcessSignal"::: @@ -266,7 +266,7 @@ For a union with object-shaped cases, the built-in `JsonUnionTypeStructuralClass adds so the serializer can infer polymorphic metadata for C# closed hierarchies without requiring explicit annotations on each base type. Explicit registrations still take precedence. -You can also opt a single closed hierarchy in to this behavior with `JsonPolymorphicAttribute.InferClosedTypePolymorphism`, without changing the application-wide `JsonSerializerOptions` setting: +You can also opt a single closed hierarchy in to this behavior with , without changing the application-wide `JsonSerializerOptions` setting: ```csharp [JsonPolymorphic(InferClosedTypePolymorphism = true)] @@ -761,7 +761,7 @@ bool equal = CryptographicOperations.FixedTimeEquals(receivedSpan, 0x42); now supports the AES Key Wrap algorithms used by JOSE and other libraries to encrypt cryptographic keys: - , , , and implement the padded AES-KWP algorithm (RFC 5649). -- `Aes.EncryptKeyWrap`, `Aes.DecryptKeyWrap`, `Aes.TryDecryptKeyWrap`, and `Aes.GetKeyWrapLength` implement the unpadded AES Key Wrap algorithm (RFC 3394), which requires plaintext that's a multiple of 8 bytes. +- , , , and implement the unpadded AES Key Wrap algorithm (RFC 3394), which requires plaintext that's a multiple of 8 bytes. Both sets of APIs provide array-returning and span-based overloads: diff --git a/docs/core/whats-new/dotnet-11/overview.md b/docs/core/whats-new/dotnet-11/overview.md index 662b07bdf6885..0d8a073b47a76 100644 --- a/docs/core/whats-new/dotnet-11/overview.md +++ b/docs/core/whats-new/dotnet-11/overview.md @@ -34,7 +34,7 @@ For more information, see [What's new in the .NET 11 runtime](runtime.md). The .NET 11 libraries include new APIs for: -- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, new for suspended starts, for safe process lookup, and `Process.Signal` with for signaling processes and inspecting how they exited. +- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, new for suspended starts, for safe process lookup, and with for signaling processes and inspecting how they exited. - Compression, including improved Base64 APIs, new methods for ZIP archive entries, Zstandard compression in , CRC32 validation when reading ZIP entries, and a `Reset()` method on the streamless Deflate, ZLib, and GZip encoders and decoders. - New numeric APIs, including IEEE 754 decimal floating-point types (, , and ), for delimiter-aware parsing, and generic . - System.Text.Json improvements, including generic type info retrieval, , per-member naming policy overrides, type-level ignore conditions, F# discriminated union support, with options, `SerializeAsyncEnumerable` overloads for `PipeWriter` targets and top-level values (NDJSON) output, serialization of C# union types with the new `JsonUnionTypeStructuralClassifier`, built-in converters for `BFloat16` and the new decimal floating-point types, and base64 schema metadata from `JsonSchemaExporter`.