diff --git a/.github/ISSUE_TEMPLATE/02-breaking-change.yml b/.github/ISSUE_TEMPLATE/02-breaking-change.yml index c837773a91214..02362a5760b58 100644 --- a/.github/ISSUE_TEMPLATE/02-breaking-change.yml +++ b/.github/ISSUE_TEMPLATE/02-breaking-change.yml @@ -3,8 +3,6 @@ description: This template is for .NET product team members to report breaking c title: "[Breaking change]: " labels: - breaking-change - - Pri1 - - doc-idea assignees: - gewarren body: diff --git a/docs/core/compatibility/11.md b/docs/core/compatibility/11.md index 7d83696490c96..5a974af91ea77 100644 --- a/docs/core/compatibility/11.md +++ b/docs/core/compatibility/11.md @@ -39,8 +39,15 @@ See [Breaking changes in ASP.NET Core 11](/aspnet/core/breaking-changes/11/overv | Title | Type of change | |----------------------------------------------------------------|-------------------| +| [API obsoletions](cryptography/11/obsolete-apis.md) | Source incompatible | | [DSA removed from macOS](cryptography/11/dsa-removed-macos.md) | Behavioral change | +## Deployment + +| Title | Type of change | +|-------|-------------------| +| [configProperties in .runtimeconfig.dev.json override .runtimeconfig.json](deployment/11/runtimeconfigdev-configproperties-precedence.md) | Behavioral change | + diff --git a/docs/fundamentals/syslib-diagnostics/syslib0063.md b/docs/fundamentals/syslib-diagnostics/syslib0063.md new file mode 100644 index 0000000000000..c0e37b697e280 --- /dev/null +++ b/docs/fundamentals/syslib-diagnostics/syslib0063.md @@ -0,0 +1,50 @@ +--- +title: SYSLIB0063 warning - NamedPipeClientStream constructor with isConnected is obsolete +description: Learn about the obsoletion of the NamedPipeClientStream constructor that includes an isConnected argument. Use of this constructor generates compile-time warning SYSLIB0063. +ms.date: 07/06/2026 +ai-usage: ai-assisted +f1_keywords: + - SYSLIB0063 +--- + +# SYSLIB0063: NamedPipeClientStream constructor with isConnected is obsolete + +Starting in .NET 11, the constructor is obsolete. Calling this constructor in code generates warning `SYSLIB0063` at compile time. + +## Reason for obsoletion + +The `isConnected` argument on this constructor has no effect. To avoid confusion, use the constructor that omits this argument. + +## Workaround + +Use instead. + +## Suppress a warning + +If you must use the obsolete API, you can suppress the warning in code or in your project file. + +To suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the warning. + +```csharp +// Disable the warning. +#pragma warning disable SYSLIB0063 + +// Code that uses obsolete API. +// ... + +// Re-enable the warning. +#pragma warning restore SYSLIB0063 +``` + +To suppress all the `SYSLIB0063` warnings in your project, add a `` property to your project file. + +```xml + + + ... + $(NoWarn);SYSLIB0063 + + +``` + +For more information, see [Suppress warnings](obsoletions-overview.md#suppress-warnings). diff --git a/docs/fundamentals/syslib-diagnostics/syslib0065.md b/docs/fundamentals/syslib-diagnostics/syslib0065.md new file mode 100644 index 0000000000000..45c35bc0aa787 --- /dev/null +++ b/docs/fundamentals/syslib-diagnostics/syslib0065.md @@ -0,0 +1,73 @@ +--- +title: SYSLIB0065 warning - AsnEncodedData.RawData setter is obsolete +description: Learn about the obsoletion of the AsnEncodedData.RawData property setter. Use of this setter generates compile-time warning SYSLIB0065. +ms.date: 07/05/2026 +ai-usage: ai-assisted +f1_keywords: + - SYSLIB0065 +--- + +# SYSLIB0065: AsnEncodedData.RawData setter is obsolete + +Starting in .NET 11, the `set` accessor of is obsolete. Setting this property in code generates warning `SYSLIB0065` at compile time. + +## Reason for obsoletion + + represents an ASN.1-encoded object. Many types derive from it, such as , and cache their decoded representation so that property access doesn't repeatedly decode the ASN.1. + +Because `RawData` is not `virtual`, setting it on a derived instance causes a discrepancy between the cached decoded state and the new raw data. The derived type can't detect that the raw data changed, so it continues to return stale decoded values. For example: + +```csharp +X509BasicConstraintsExtension extension = new( + certificateAuthority: true, + hasPathLengthConstraint: true, + pathLengthConstraint: 3, + critical: true); + +X509BasicConstraintsExtension decoded = new(); +decoded.RawData = extension.RawData; +Console.WriteLine(decoded.CertificateAuthority); // Unexpectedly prints False +Console.WriteLine(decoded.HasPathLengthConstraint); // Unexpectedly prints False +Console.WriteLine(decoded.PathLengthConstraint); // Unexpectedly prints 0 +``` + +## Workaround + +To maintain coherency between the decoded state and the underlying data, use the constructor of the appropriate type to decode data. Treat instances as read-only—construct a new instance instead of reusing an existing one. + +```csharp +// Instead of setting RawData, use the constructor. +X509BasicConstraintsExtension decoded = new(extension, extension.Critical); +``` + +If you need mutable behavior, use . The `CopyFrom` method is `virtual`, so derived types can invalidate their decoded state when the raw data changes. + +## Suppress a warning + +If you must use the obsolete setter, you can suppress the warning in code or in your project file. + +To suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the warning. + +```csharp +// Disable the warning. +#pragma warning disable SYSLIB0065 + +// Code that uses obsolete API. +// ... + +// Re-enable the warning. +#pragma warning restore SYSLIB0065 +``` + +To suppress all `SYSLIB0065` warnings in your project, add a `` property to your project file. + +```xml + + + ... + $(NoWarn);SYSLIB0065 + + +``` + +For more information, see [Suppress warnings](obsoletions-overview.md#suppress-warnings). diff --git a/docs/fundamentals/syslib-diagnostics/syslib1220-1229.md b/docs/fundamentals/syslib-diagnostics/syslib1220-1229.md index aeb2af99514bf..e1d3c7ff89b69 100644 --- a/docs/fundamentals/syslib-diagnostics/syslib1220-1229.md +++ b/docs/fundamentals/syslib-diagnostics/syslib1220-1229.md @@ -25,8 +25,8 @@ The following table shows the diagnostic IDs for System.Text.Json source-generat | `SYSLIB1222` | Constructor annotated with `JsonConstructorAttribute` is inaccessible. | | `SYSLIB1223` | Attributes deriving from `JsonConverterAttribute` are not supported by the source generator. | | `SYSLIB1224` | Types annotated with `JsonSerializableAttribute` must be classes deriving from `JsonSerializerContext`. | -| `SYSLIB1225` | Type includes `ref` like property, field, or constructor parameter. | -| `SYSLIB1226` | Reserved for System.Text.Json.SourceGeneration. | -| `SYSLIB1227` | Reserved for System.Text.Json.SourceGeneration. | -| `SYSLIB1228` | Reserved for System.Text.Json.SourceGeneration. | -| `SYSLIB1229` | Reserved for System.Text.Json.SourceGeneration. | +| `SYSLIB1225` | Type includes a ref-like property, a field, or a constructor parameter. | +| `SYSLIB1226` | `JsonIgnoreCondition.Always` is not valid on type-level `JsonIgnoreAttribute` annotations. | +| `SYSLIB1227` | Union case types cannot be unambiguously classified by JSON value type. | +| `SYSLIB1228` | Union type shape is not a valid C# union. | +| `SYSLIB1229` | Open generic derived type could not be resolved for the polymorphic base type. | diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml index 06f6442817523..fe01b6dfeb346 100644 --- a/docs/navigate/tools-diagnostics/toc.yml +++ b/docs/navigate/tools-diagnostics/toc.yml @@ -4091,8 +4091,12 @@ items: href: ../../fundamentals/syslib-diagnostics/syslib0061.md - name: SYSLIB0062 href: ../../fundamentals/syslib-diagnostics/syslib0062.md + - name: SYSLIB0063 + href: ../../fundamentals/syslib-diagnostics/syslib0063.md - name: SYSLIB0064 href: ../../fundamentals/syslib-diagnostics/syslib0064.md + - name: SYSLIB0065 + href: ../../fundamentals/syslib-diagnostics/syslib0065.md - name: Experimental features items: - name: Overview