Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6732d55
Bump the dotnet group with 1 update (#54421)
dependabot[bot] Jun 17, 2026
f6b238d
Bump the dotnet group with 2 updates (#54422)
dependabot[bot] Jun 17, 2026
13b6a40
Bump the dotnet group with 4 updates (#54433)
dependabot[bot] Jun 17, 2026
f97f32c
Bump the dotnet group with 4 updates (#54438)
dependabot[bot] Jun 17, 2026
4caaac1
Bump the dotnet group with 1 update (#54442)
dependabot[bot] Jun 17, 2026
d2db246
Bump the dotnet group with 1 update (#54443)
dependabot[bot] Jun 17, 2026
6324c56
Bump the dotnet group with 2 updates (#54445)
dependabot[bot] Jun 17, 2026
ccea611
Bump the dotnet group with 1 update (#54449)
dependabot[bot] Jun 17, 2026
415a306
Bump the dotnet group with 2 updates (#54450)
dependabot[bot] Jun 17, 2026
8be492f
Bump the dotnet group with 2 updates (#54454)
dependabot[bot] Jun 17, 2026
180a8ba
Bump the dotnet group with 2 updates (#54455)
dependabot[bot] Jun 17, 2026
8daa5bc
Bump the dotnet group with 3 updates (#54456)
dependabot[bot] Jun 17, 2026
b90446b
Bump the dotnet group with 1 update (#54461)
dependabot[bot] Jun 17, 2026
e8562f5
Remove references to ai-samples (archived repo) (#54412)
gewarren Jun 17, 2026
2438a1a
Remove supplemental API remarks (#54411)
gewarren Jun 17, 2026
d2c76c1
Bump the dotnet group with 2 updates (#54458)
dependabot[bot] Jun 17, 2026
63f85f5
Breaking change docs: CborReader/CborWriter enforce default maximum n…
Copilot Jun 17, 2026
7e68e9b
Document null binding to non-nullable value types (#54464)
tarekgh Jun 17, 2026
3d76a0a
Fix incorrect Product type reference in generics article (#54462)
sselva-ajbell Jun 17, 2026
3f4708d
Fix typo in tutorial on numbers in C# (#54470)
mwiemer-microsoft Jun 18, 2026
7d8138f
Add period to end of "gracefully" sentence (#54467)
mwiemer-microsoft Jun 18, 2026
f2e5e25
Change "doesn't" to "don't" (#54466)
mwiemer-microsoft Jun 18, 2026
2f1ee32
Add SDK download link to version selection page (#54207)
heissenberg06 Jun 18, 2026
e6b2045
Fix "one method" typo in csharp/modern-events.md (#54465)
mwiemer-microsoft Jun 18, 2026
9076a5a
Correct case for 'pi' in area calculation challenge (#54471)
mwiemer-microsoft Jun 18, 2026
d66dce4
Fix typo in C# Dev Kit reference (#54469)
mwiemer-microsoft Jun 18, 2026
f41e82c
Change headings to sentence case (#54468)
mwiemer-microsoft Jun 18, 2026
7dd578e
Replace all occurences of redundant spacing in if condition (#54405)
BartoszKlonowski Jun 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .openpublishing.redirection.ai.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
"redirect_url": "/dotnet/ai/quickstarts/prompt-model",
"redirect_document_id": true
},
{
"source_path_from_root": "/docs/ai/resources/get-started.md",
"redirect_url": "/dotnet/ai/overview"
},
{
"source_path_from_root": "/docs/ai/semantic-kernel-dotnet-overview.md",
"redirect_url": "/semantic-kernel/overview"
Expand Down
756 changes: 718 additions & 38 deletions .openpublishing.redirection.fundamentals.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions docs/ai/evaluation/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,14 @@ The `dotnet aieval` tool, which ships as part of the `Microsoft.Extensions.AI.Ev

The libraries are flexible and you can pick the components you need. For example, disable response caching or tailor reporting to work best in your environment. You can also customize and configure your evaluations, for example, by adding customized metrics and reporting options.

## Samples
## Usage examples

For a more comprehensive tour of the functionality and APIs in the Microsoft.Extensions.AI.Evaluation libraries, see the [API usage examples (dotnet/ai-samples repo)](https://github.com/dotnet/ai-samples/blob/main/src/microsoft-extensions-ai-evaluation/api/). These examples are a collection of unit tests. Each unit test showcases a specific concept or API and builds on the concepts and APIs showcased in previous unit tests.
For usage examples, see the following tutorials:

- [Quickstart: Evaluate response quality](evaluate-ai-response.md)
- [Tutorial: Evaluate response quality with caching and reporting](evaluate-with-reporting.md)
- [Tutorial: Evaluate response safety with caching and reporting](evaluate-safety.md)

## See also

- [Quickstart: Evaluate response quality](evaluate-ai-response.md)
- [Evaluation of generative AI apps (Foundry)](/azure/ai-studio/concepts/evaluation-approach-gen-ai)
2 changes: 0 additions & 2 deletions docs/ai/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ landingContent:
linkLists:
- linkListType: sample
links:
- text: Get started resources
url: resources/get-started.md
- text: Azure AI resources
url: resources/azure-ai.md
- text: MCP server resources
Expand Down
2 changes: 1 addition & 1 deletion docs/ai/microsoft-extensions-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You can start building with `Microsoft.Extensions.AI` in the following ways:
- **Application developers**: Use the abstractions to simplify integration into your apps. This enables portability across models and services, facilitates testing and mocking, leverages middleware provided by the ecosystem, and maintains a consistent API throughout your app, even if you use different services in different parts of your application.
- **Ecosystem contributors**: If you're interested in contributing to the ecosystem, consider writing custom middleware components.

For more samples, see the [dotnet/ai-samples](https://aka.ms/meai-samples) GitHub repository. For an end-to-end sample, see [eShopSupport](https://github.com/dotnet/eShopSupport).
For an end-to-end sample, see [eShopSupport](https://github.com/dotnet/eShopSupport).

## See also

Expand Down
8 changes: 4 additions & 4 deletions docs/ai/quickstarts/snippets/structured-output/SOChat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
<PackageReference Include="Azure.Identity" Version="1.21.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="10.6.0" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="10.6.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.AI" Version="10.7.0" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="10.7.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.9" />
</ItemGroup>

</Project>
23 changes: 0 additions & 23 deletions docs/ai/resources/get-started.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="OllamaSharp" Version="5.4.25" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.9" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="OllamaSharp" Version="5.4.25" />
<PackageReference Include="System.Threading.RateLimiting" Version="10.0.8" />
<PackageReference Include="System.Threading.RateLimiting" Version="10.0.9" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions docs/ai/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ items:
href: evaluation/evaluate-safety.md
- name: Resources
items:
- name: Get started resources
href: resources/get-started.md
- name: Azure AI resources
href: resources/azure-ai.md
- name: MCP server resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="10.5.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.7" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="10.7.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.9" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.InMemory" Version="1.55.0-preview" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<ItemGroup>
<PackageReference Include="Azure.Search.Documents" Version="12.0.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="10.6.0" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="10.6.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="10.7.0" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="10.7.0" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.AzureAISearch" Version="1.*-*" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.InMemory" Version="1.*-*" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Qdrant" Version="1.*-*" />
Expand Down
1 change: 1 addition & 0 deletions docs/core/compatibility/11.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ See [Breaking changes in ASP.NET Core 11](/aspnet/core/breaking-changes/11/overv

| Title | Type of change |
|-------------------------------------------------------------------|-------------------|
| [CborReader and CborWriter enforce a default maximum nesting depth](core-libraries/11/cbor-max-depth.md) | Behavioral change |
| [CRC32 validation added when reading ZIP archive entries](core-libraries/11/ziparchive-entry-crc32-validation.md) | Behavioral change |
| [DateOnly and TimeOnly TryParse methods throw for invalid input](core-libraries/11/dateonly-timeonly-tryparse-argumentexception.md) | Behavioral change |
| [DeflateStream and GZipStream write headers and footers for empty payload](core-libraries/11/deflatestream-gzipstream-empty-payload.md) | Behavioral change |
Expand Down
101 changes: 101 additions & 0 deletions docs/core/compatibility/core-libraries/11/cbor-max-depth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: "Breaking change: CborReader and CborWriter enforce a default maximum nesting depth"
description: "Learn about the breaking change in .NET 11 where CborReader and CborWriter enforce a maximum nesting depth by default, throwing exceptions when the limit is exceeded."
ms.date: 06/12/2026
ai-usage: ai-assisted
---

# CborReader and CborWriter enforce a default maximum nesting depth

Starting in .NET 11, <xref:System.Formats.Cbor.CborReader> and <xref:System.Formats.Cbor.CborWriter> enforce a maximum nesting depth by default. Reading or writing CBOR data that exceeds the configured maximum depth throws an exception.

## Version introduced

.NET 11 Preview 5

## Previous behavior

Previously, `CborReader` and `CborWriter` had no maximum nesting depth limit. Reading or writing arbitrarily nested CBOR data structures succeeded without restriction.

```csharp
// Deeply nested CBOR data (100 levels of nested arrays)
var reader = new CborReader(deeplyNestedBuffer);

for (int i = 0; i < 100; i++)
{
reader.ReadStartArray(); // Succeeded at any depth
}
```

```csharp
var writer = new CborWriter();

for (int i = 0; i < 2000; i++)
{
writer.WriteStartArray(1); // Succeeded at any depth
}
```

## New behavior

Starting in .NET 11, `CborReader` throws <xref:System.Formats.Cbor.CborContentException> when reading a container (array, map, or indefinite-length string) that would exceed the maximum allowed depth (default: 64). `CborWriter` throws <xref:System.InvalidOperationException> when writing a container that would exceed the maximum allowed depth (default: 1000).

```csharp
// Throws CborContentException when nesting depth exceeds 64
var reader = new CborReader(deeplyNestedBuffer);

for (int i = 0; i < 65; i++)
{
reader.ReadStartArray(); // Throws CborContentException on the 65th call
}
```

```csharp
// Throws InvalidOperationException when nesting depth exceeds 1000
var writer = new CborWriter();

for (int i = 0; i < 1001; i++)
{
writer.WriteStartArray(1); // Throws InvalidOperationException on the 1001st call
}
```

## Type of breaking change

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

## Reason for change

This change limits the nesting depth to prevent excessive memory consumption and execution time. When you skip over a deeply nested array or map, the system must process every element in the structure, which can use a surprising amount of memory. This change is also consistent with the behavior of <xref:System.Text.Json.Utf8JsonReader> and <xref:System.Text.Json.Utf8JsonWriter>.

## Recommended action

If your application processes CBOR data nested more deeply than the defaults allow (64 levels for reading, 1000 levels for writing), use the new options types to specify a larger limit:

```csharp
// For reading CBOR data nested more than 64 levels deep
var options = new CborReaderOptions { MaxDepth = 256 };
var reader = new CborReader(data, options);
```

```csharp
// For writing CBOR data nested more than 1000 levels deep
var writerOptions = new CborWriterOptions { MaxDepth = 2000 };
var writer = new CborWriter(writerOptions);
```

> [!NOTE]
> Unlike `Utf8JsonReader`/`Utf8JsonWriter`, setting `MaxDepth = 0` in CBOR means *no nesting is allowed* (not "use the runtime default"). To use the runtime default, set `MaxDepth = -1` or omit the property when constructing `CborReaderOptions`/`CborWriterOptions`.

There is no AppContext switch to restore the previous unlimited-depth behavior.

## Affected APIs

- <xref:System.Formats.Cbor.CborReader.ReadStartArray?displayProperty=fullName>
- <xref:System.Formats.Cbor.CborReader.ReadStartMap?displayProperty=fullName>
- <xref:System.Formats.Cbor.CborReader.ReadStartIndefiniteLengthByteString?displayProperty=fullName>
- <xref:System.Formats.Cbor.CborReader.ReadStartIndefiniteLengthTextString?displayProperty=fullName>
- <xref:System.Formats.Cbor.CborWriter.WriteStartArray(System.Nullable{System.Int32})?displayProperty=nameWithType>
- <xref:System.Formats.Cbor.CborWriter.WriteStartIndefiniteLengthByteString?displayProperty=fullName>
- <xref:System.Formats.Cbor.CborWriter.WriteStartIndefiniteLengthTextString?displayProperty=fullName>
- <xref:System.Formats.Cbor.CborWriter.WriteStartMap(System.Nullable{System.Int32})?displayProperty=fullName>
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ If you need the previous format, you can use a custom string formatting mechanis

## See also

- [Format a complex number](../../../../fundamentals/runtime-libraries/system-numerics-complex.md#format-a-complex-number)
- [Format a complex number](xref:System.Numerics.Complex#format-a-complex-number)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Breaking change: Null values preserved in configuration"
description: "Learn about the breaking change in .NET 10 where configuration providers now preserve null values instead of treating them as missing values."
ms.date: 08/07/2025
ms.date: 06/17/2026
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs/issues/46890
---
Expand Down Expand Up @@ -98,6 +98,20 @@ Array1: 'null', 'null'
Array2:
```

### Non-nullable value types

The binder now also binds `null` to non-nullable value-type properties (for example, `int`, `bool`, or an enum) by setting them to the type's default value (`default(T)`).

Previously, with the JSON configuration provider, binding a `null` to such a property threw an `InvalidOperationException` similar to the following, because the provider had converted the `null` into an empty string and an empty string can't be converted to the target value type:

```output
Failed to convert configuration value at 'SomeSection:DayOfWeekProperty' to type 'System.DayOfWeek'.
```

Starting in .NET 10, the same binding succeeds and the property is set to its default value. For example, a `null` bound to a `DayOfWeek` property results in `DayOfWeek.Sunday` (`0`), and a `null` bound to an `int` property results in `0`. No exception is thrown.

Providers that store a real `null` value, such as the in-memory provider, already bound `null` to non-nullable value-type properties by setting the default value, even before .NET 10, and the configuration source generator also matches this behavior. The change makes the JSON provider and the reflection-based binder consistent with that behavior.

## Type of breaking change

This is a [behavioral change](../../categories.md#behavioral-change).
Expand All @@ -112,6 +126,7 @@ If you prefer the previous behavior, you can adjust your configuration according

- When using the JSON configuration provider, replace `null` values with empty strings (`""`) to restore the original behavior, where empty strings are bound instead of `null`.
- For other providers that support `null` values, remove the `null` entries from the configuration to replicate the earlier behavior, where missing values are ignored and existing property values remain unchanged.
- If you previously relied on an exception when a `null` value was bound to a non-nullable value-type property, note that the binder now sets the property to its default value instead. To distinguish a missing or `null` value from a real value, make the property nullable (for example, `int?` or `DayOfWeek?`) and check for `null` after binding, or validate the configuration explicitly.

## Affected APIs

Expand Down
2 changes: 2 additions & 0 deletions docs/core/compatibility/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ items:
href: 11.md
- name: Core .NET libraries
items:
- name: CborReader and CborWriter enforce a default maximum nesting depth
href: core-libraries/11/cbor-max-depth.md
- name: CRC32 validation added when reading ZIP archive entries
href: core-libraries/11/ziparchive-entry-crc32-validation.md
- name: DateOnly and TimeOnly TryParse methods throw for invalid input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.AmbientMetadata.Build" Version="10.6.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.AmbientMetadata.Build" Version="10.7.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.ResourceMonitoring" Version="10.6.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.ResourceMonitoring" Version="10.7.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.9" />
<PackageReference Include="Spectre.Console" Version="0.56.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.9" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.9" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AsyncState" Version="10.6.0" />
<PackageReference Include="Microsoft.Extensions.AsyncState" Version="10.7.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.9" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.9" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.9" />
</ItemGroup>

</Project>
Loading
Loading