Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/02-breaking-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions docs/core/compatibility/11.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

<!--
## Entity Framework Core

Expand Down
6 changes: 4 additions & 2 deletions docs/core/compatibility/core-libraries/11/obsolete-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
title: "Breaking change: .NET 11 obsoletions with custom IDs"
titleSuffix: ""
description: Learn about the APIs that have been marked as obsolete in .NET 11 with a custom diagnostic ID.
ms.date: 04/03/2026
ms.date: 07/06/2026
ai-usage: ai-assisted
---
# API obsoletions with non-default diagnostic IDs (.NET 11)

Some APIs have been marked as obsolete, starting in .NET 11.
Some APIs are marked as obsolete, starting in .NET 11.

This breaking change is specific to APIs that have been marked as obsolete *with a custom diagnostic ID*. Suppressing the default obsoletion diagnostic ID, which is [CS0618](../../../../csharp/language-reference/compiler-messages/cs0618.md) for the C# compiler, does not suppress the warnings that the compiler generates when these APIs are used.

Expand Down Expand Up @@ -43,6 +44,7 @@ These obsoletions can affect [source compatibility](../../categories.md#source-c

## See also

- [Cryptography obsoletions (.NET 11)](../../cryptography/11/obsolete-apis.md)
- [API obsoletions with non-default diagnostic IDs (.NET 10)](../10.0/obsolete-apis.md)
- [API obsoletions with non-default diagnostic IDs (.NET 9)](../9.0/obsolete-apis-with-custom-diagnostics.md)
- [API obsoletions with non-default diagnostic IDs (.NET 8)](../8.0/obsolete-apis-with-custom-diagnostics.md)
Expand Down
49 changes: 49 additions & 0 deletions docs/core/compatibility/cryptography/11/obsolete-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: "Breaking change: .NET 11 obsoletions in cryptography"
titleSuffix: ""
description: Learn about the cryptography APIs that have been marked as obsolete in .NET 11.
ms.date: 07/06/2026
ai-usage: ai-assisted
---
# Cryptography obsoletions (.NET 11)

Some cryptography APIs are marked as obsolete, starting in .NET 11.

For obsoletions in other core .NET library areas, see [API obsoletions with non-default diagnostic IDs (.NET 11)](../../core-libraries/11/obsolete-apis.md).

## Previous behavior

Previously, you could use these APIs without any compile-time warnings about obsoletion.

## New behavior

In .NET 11 and later versions, using these APIs produces a compile-time diagnostic.

The following table lists the custom diagnostic IDs and their corresponding warning messages.

| Diagnostic ID | Description | Severity |
|---------------|-------------|----------|
| [SYSLIB0065](../../../../fundamentals/syslib-diagnostics/syslib0065.md) | The `set` accessor of <xref:System.Security.Cryptography.AsnEncodedData.RawData?displayProperty=nameWithType> is obsolete. Use the constructor of the appropriate type to decode data, or use <xref:System.Security.Cryptography.AsnEncodedData.CopyFrom(System.Security.Cryptography.AsnEncodedData)?displayProperty=nameWithType> for mutable scenarios. | Warning |

## Version introduced

.NET 11 Preview 6

## Type of breaking change

These obsoletions can affect [source compatibility](../../categories.md#source-compatibility).

## Recommended action

If you must keep use the obsolete APIs, suppress the warning by using the custom diagnostic ID.

## Affected APIs

### SYSLIB0065

- `set` accessor of <xref:System.Security.Cryptography.AsnEncodedData.RawData?displayProperty=fullName>

## See also

- [SYSLIB0065: AsnEncodedData.RawData setter is obsolete](../../../../fundamentals/syslib-diagnostics/syslib0065.md)
- [API obsoletions with non-default diagnostic IDs (.NET 11)](../../core-libraries/11/obsolete-apis.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: "Breaking change: configProperties in .runtimeconfig.dev.json override .runtimeconfig.json"
description: "Learn about the breaking change in .NET 11 where configProperties in .runtimeconfig.dev.json override matching configProperties in .runtimeconfig.json."
ms.date: 07/05/2026
ai-usage: ai-assisted
---

# configProperties in .runtimeconfig.dev.json override .runtimeconfig.json

If an app defines the same runtime `configProperties` key in both `.runtimeconfig.json` and `.runtimeconfig.dev.json`, the `.runtimeconfig.dev.json` value takes precedence.

## Version introduced

.NET 11 Preview 6

## Previous behavior

Previously, `.runtimeconfig.json` took precedence over `.runtimeconfig.dev.json` for duplicate `configProperties` keys.

For example:

```json
// app.runtimeconfig.json
{
"runtimeOptions": {
"configProperties": {
"System.GC.Concurrent": true
}
}
}
```

```json
// app.runtimeconfig.dev.json
{
"runtimeOptions": {
"configProperties": {
"System.GC.Concurrent": false
}
}
}
```

With this configuration, the runtime used `System.GC.Concurrent: true`.

## New behavior

To support development-time overrides in .NET 11, `.runtimeconfig.dev.json` takes precedence over `.runtimeconfig.json` for duplicate `configProperties` keys.

Using the same example, the runtime now uses `System.GC.Concurrent: false`.

## Type of breaking change

This change is a [behavioral change](../../categories.md#behavioral-change).

## Reason for change

This change enables developers to override production settings during development without modifying production configuration files.

For more information, see [dotnet/runtime#126606](https://github.com/dotnet/runtime/issues/126606).

## Recommended action

For predictable production behavior, only place development-time overrides in `.runtimeconfig.dev.json`.

To prevent a development-time override, remove the duplicate key from `.runtimeconfig.dev.json`.

## Affected APIs

None.

## See also

- [.NET runtime configuration settings](../../../runtime-config/index.md)
6 changes: 6 additions & 0 deletions docs/core/compatibility/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ items:
href: core-libraries/11/ziparchive-createasync-eager-load.md
- name: Cryptography
items:
- name: API obsoletions
href: cryptography/11/obsolete-apis.md
- name: DSA removed from macOS
href: cryptography/11/dsa-removed-macos.md
- name: Deployment
items:
- name: configProperties in .runtimeconfig.dev.json override .runtimeconfig.json
href: deployment/11/runtimeconfigdev-configproperties-precedence.md
- name: Extensions
items:
- name: IHost.RunAsync and IHost.StopAsync throw when a BackgroundService fails
Expand Down
4 changes: 4 additions & 0 deletions docs/core/runtime-config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ Specify runtime configuration options in the **configProperties** section of the
}
```

Starting in .NET 11, to support development-time overrides, the value in *[appname].runtimeconfig.dev.json* takes precedence when you define the same key in `configProperties` in both *[appname].runtimeconfig.dev.json* and *[appname].runtimeconfig.json*.

For more information, see [configProperties in .runtimeconfig.dev.json override .runtimeconfig.json](../compatibility/deployment/11/runtimeconfigdev-configproperties-precedence.md).

### Example [appname].runtimeconfig.json file

If you're placing the options in the *output* JSON file, nest them under the `runtimeOptions` property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ private static void ShowIndentation()

// First content line begins at column 0 of the value:
Console.WriteLine(xml);
// <order id="42">
// <item>book</item>
// </order>
/* Output:
<order id="42">
<item>book</item>
</order>
*/
// </Indentation>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ The following table lists the `SYSLIB0XXX` obsoletions in .NET 5+.
| [SYSLIB0060](syslib0060.md) | Warning | Constructors on <xref:System.Security.Cryptography.Rfc2898DeriveBytes?displayProperty=nameWithType> are obsolete. Use <xref:System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2*?displayProperty=nameWithType> instead. |
| [SYSLIB0061](syslib0061.md) | Warning | The `Queryable` <xref:System.Linq.Queryable.MaxBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0})?displayProperty=nameWithType> and <xref:System.Linq.Queryable.MinBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0})?displayProperty=nameWithType> taking an `IComparer<TSource>` are obsolete. Use the new ones that take an `IComparer<TKey>`. |
| [SYSLIB0062](syslib0062.md) | Warning | <xref:System.Xml.Xsl.XsltSettings.EnableScript?displayProperty=nameWithType> is obsolete. |
| [SYSLIB0063](syslib0063.md) | Warning | The <xref:System.IO.Pipes.NamedPipeClientStream> constructor that has an `isConnected` parameter is obsolete because the argument has no effect. Use the constructor that accepts `direction`, `isAsync`, and `safePipeHandle`. |
| [SYSLIB0064](syslib0064.md) | Warning | <xref:System.Security.Cryptography.RSACryptoServiceProvider.Encrypt(System.Byte[],System.Boolean)?displayProperty=nameWithType> and <xref:System.Security.Cryptography.RSACryptoServiceProvider.Decrypt(System.Byte[],System.Boolean)?displayProperty=nameWithType> are obsolete. Use the overloads that accept an <xref:System.Security.Cryptography.RSAEncryptionPadding> instead. |
| [SYSLIB0065](syslib0065.md) | Warning | The `set` accessor of <xref:System.Security.Cryptography.AsnEncodedData.RawData?displayProperty=nameWithType> is obsolete. Use the constructor of the appropriate type to decode data, or use <xref:System.Security.Cryptography.AsnEncodedData.CopyFrom(System.Security.Cryptography.AsnEncodedData)?displayProperty=nameWithType> for mutable scenarios. |

## EXTOBS obsoletions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ The following table provides an index to the `SYSLIB1XXX` diagnostics in .NET 6
| [SYSLIB1220][1220] | JsonSourceGenerator encountered a [JsonConverterAttribute] with an invalid type argument. |
| [SYSLIB1221][1221] | JsonSourceGenerator does not support this C# language version. |
| [SYSLIB1222][1222] | Constructor annotated with JsonConstructorAttribute is inaccessible. |
| [SYSLIB1223][1223] | Constructor annotated with JsonConstructorAttribute is inaccessible. |
| [SYSLIB1223][1223] | Attributes deriving from JsonConverterAttribute are not supported by the source generator. |
| [SYSLIB1224][1224] | Types annotated with JsonSerializableAttribute must be classes deriving from JsonSerializerContext. |
| [SYSLIB1225][1225] | (Reserved for System.Text.Json.SourceGeneration.) |
| [SYSLIB1226][1226] | (Reserved for System.Text.Json.SourceGeneration.) |
| [SYSLIB1227][1227] | (Reserved for System.Text.Json.SourceGeneration.) |
| [SYSLIB1228][1228] | (Reserved for System.Text.Json.SourceGeneration.) |
| [SYSLIB1229][1229] | (Reserved for System.Text.Json.SourceGeneration.) |
| [SYSLIB1225][1225] | Type includes a ref-like property, a field, or a constructor parameter. |
| [SYSLIB1226][1226] | `JsonIgnoreCondition.Always` is not valid on type-level `JsonIgnoreAttribute` annotations. |
| [SYSLIB1227][1227] | Union case types cannot be unambiguously classified by JSON value type. |
| [SYSLIB1228][1228] | Union type shape is not a valid C# union. |
| [SYSLIB1229][1229] | Open generic derived type could not be resolved for the polymorphic base type. |
| [SYSLIB1230][1230] | Deriving from a `GeneratedComInterface`-attributed interface defined in another assembly is not supported. |

<!-- Include adds ## Suppress warnings (H2 heading) -->
Expand Down
50 changes: 50 additions & 0 deletions docs/fundamentals/syslib-diagnostics/syslib0063.md
Original file line number Diff line number Diff line change
@@ -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 <xref:System.IO.Pipes.NamedPipeClientStream.%23ctor(System.IO.Pipes.PipeDirection,System.Boolean,System.Boolean,Microsoft.Win32.SafeHandles.SafePipeHandle)?displayProperty=nameWithType> 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 <xref:System.IO.Pipes.NamedPipeClientStream.%23ctor(System.IO.Pipes.PipeDirection,System.Boolean,Microsoft.Win32.SafeHandles.SafePipeHandle)?displayProperty=nameWithType> 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 `<NoWarn>` property to your project file.

```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
...
<NoWarn>$(NoWarn);SYSLIB0063</NoWarn>
</PropertyGroup>
</Project>
```

For more information, see [Suppress warnings](obsoletions-overview.md#suppress-warnings).
73 changes: 73 additions & 0 deletions docs/fundamentals/syslib-diagnostics/syslib0065.md
Original file line number Diff line number Diff line change
@@ -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 <xref:System.Security.Cryptography.AsnEncodedData.RawData?displayProperty=nameWithType> is obsolete. Setting this property in code generates warning `SYSLIB0065` at compile time.

## Reason for obsoletion

<xref:System.Security.Cryptography.AsnEncodedData> represents an ASN.1-encoded object. Many types derive from it, such as <xref:System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension>, 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 <xref:System.Security.Cryptography.AsnEncodedData.CopyFrom(System.Security.Cryptography.AsnEncodedData)?displayProperty=nameWithType>. 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 `<NoWarn>` property to your project file.

```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
...
<NoWarn>$(NoWarn);SYSLIB0065</NoWarn>
</PropertyGroup>
</Project>
```

For more information, see [Suppress warnings](obsoletions-overview.md#suppress-warnings).
10 changes: 5 additions & 5 deletions docs/fundamentals/syslib-diagnostics/syslib1220-1229.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
4 changes: 4 additions & 0 deletions docs/navigate/tools-diagnostics/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading