Skip to content

Commit 6e20592

Browse files
authored
Merge pull request #51009 from dotnet/main
Merge main into live
2 parents 9ca4c66 + 7de8a4c commit 6e20592

9 files changed

Lines changed: 277 additions & 22 deletions

File tree

docs/azure/includes/dotnet-all.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
| Mixed Reality Authentication | NuGet [1.2.0](https://www.nuget.org/packages/Azure.MixedReality.Authentication/1.2.0) | [docs](/dotnet/api/overview/azure/MixedReality.Authentication-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.MixedReality.Authentication_1.2.0/sdk/mixedreality/Azure.MixedReality.Authentication/) |
7676
| Models Repository | NuGet [1.0.0-preview.6](https://www.nuget.org/packages/Azure.IoT.ModelsRepository/1.0.0-preview.6) | [docs](/dotnet/api/overview/azure/IoT.ModelsRepository-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-preview.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.ModelsRepository_1.0.0-preview.6/sdk/modelsrepository/Azure.IoT.ModelsRepository/) |
7777
| Monitor Ingestion | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Monitor.Ingestion/1.2.0) | [docs](/dotnet/api/overview/azure/Monitor.Ingestion-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Ingestion_1.2.0/sdk/monitor/Azure.Monitor.Ingestion/) |
78+
| Monitor Query Logs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Monitor.Query.Logs/1.0.0) | [docs](/dotnet/api/overview/azure/Monitor.Query.Logs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query.Logs_1.0.0/sdk/monitor/Azure.Monitor.Query.Logs/) |
79+
| Monitor Query Metrics | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Monitor.Query.Metrics/1.0.0) | [docs](/dotnet/api/overview/azure/Monitor.Query.Metrics-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query.Metrics_1.0.0/sdk/monitor/Azure.Monitor.Query.Metrics/) |
7880
| Online Experimentation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.OnlineExperimentation/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Analytics.OnlineExperimentation-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.OnlineExperimentation_1.0.0-beta.1/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/) |
7981
| OpenAI Assistants | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.AI.OpenAI.Assistants/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/AI.OpenAI.Assistants-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI.Assistants_1.0.0-beta.4/sdk/openai/Azure.AI.OpenAI.Assistants/) |
8082
| OpenAI Inference | NuGet [2.1.0](https://www.nuget.org/packages/Azure.AI.OpenAI/2.1.0)<br>NuGet [2.8.0-beta.1](https://www.nuget.org/packages/Azure.AI.OpenAI/2.8.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.OpenAI-readme) | GitHub [2.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.1.0/sdk/openai/Azure.AI.OpenAI/)<br>GitHub [2.8.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.8.0-beta.1/sdk/openai/Azure.AI.OpenAI/) |
@@ -410,12 +412,12 @@
410412
| HTTP ASPNETCore Analyzers | NuGet [1.0.4](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.Analyzers/1.0.4) | | |
411413
| IoT Operations MQTT | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Iot.Operations.Mqtt/1.0.0) | | |
412414
| IoT Operations Protocol | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Iot.Operations.Protocol/1.0.0) | | |
413-
| IoT Operations Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Iot.Operations.Services/1.0.0) | | |
415+
| IoT Operations Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Iot.Operations.Services/1.0.0)<br>NuGet [1.1.0-rc](https://www.nuget.org/packages/Azure.Iot.Operations.Services/1.1.0-rc) | | |
414416
| Item Templates NetCore | NuGet [4.0.5337](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetCore/4.0.5337) | | |
415417
| Item Templates NetFx | NuGet [4.0.5337](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetFx/4.0.5337) | | |
416418
| Microsoft.Azure.DataFactoryTestingFramework.Expressions | NuGet [0.2.7](https://www.nuget.org/packages/Microsoft.Azure.DataFactoryTestingFramework.Expressions/0.2.7) | | |
417419
| Microsoft.Azure.Functions.Worker.OpenTelemetry | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.OpenTelemetry/1.1.0) | | |
418-
| OpenTelemetry Profiler | NuGet [1.0.0-beta6](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Profiler/1.0.0-beta6) | | |
420+
| OpenTelemetry Profiler | NuGet [1.0.0-beta7](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Profiler/1.0.0-beta7) | | |
419421
| Speech CLI | NuGet [1.47.0](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.CLI/1.47.0) | | |
420422
| Speech Extension Embedded SR | NuGet [1.47.0](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.Extension.Embedded.SR/1.47.0) | | |
421423
| Speech Extension Embedded TTS | NuGet [1.47.0](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.Extension.Embedded.TTS/1.47.0) | | |
@@ -424,15 +426,13 @@
424426
| System Net Client Model | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/System.Net.ClientModel/1.0.0-beta.1) | | |
425427
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Iot.Operations.Connector/1.0.0) | | |
426428
| Unknown Display Name | NuGet [0.1.0](https://www.nuget.org/packages/Azure.Iot.Operations.Templates/0.1.0) | | |
427-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp/1.0.0)<br>NuGet [2.0.0-beta.9](https://www.nuget.org/packages/Azure.Mcp/2.0.0-beta.9) | | |
428-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.linux-arm64/1.0.0)<br>NuGet [2.0.0-beta.9](https://www.nuget.org/packages/Azure.Mcp.linux-arm64/2.0.0-beta.9) | | |
429-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.linux-x64/1.0.0)<br>NuGet [2.0.0-beta.9](https://www.nuget.org/packages/Azure.Mcp.linux-x64/2.0.0-beta.9) | | |
430-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.osx-arm64/1.0.0)<br>NuGet [2.0.0-beta.9](https://www.nuget.org/packages/Azure.Mcp.osx-arm64/2.0.0-beta.9) | | |
431-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.osx-x64/1.0.0)<br>NuGet [2.0.0-beta.9](https://www.nuget.org/packages/Azure.Mcp.osx-x64/2.0.0-beta.9) | | |
432-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.win-arm64/1.0.0)<br>NuGet [2.0.0-beta.9](https://www.nuget.org/packages/Azure.Mcp.win-arm64/2.0.0-beta.9) | | |
433-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.win-x64/1.0.0)<br>NuGet [2.0.0-beta.9](https://www.nuget.org/packages/Azure.Mcp.win-x64/2.0.0-beta.9) | | |
434-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Monitor.Query.Logs/1.0.0) | | |
435-
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Monitor.Query.Metrics/1.0.0) | | |
429+
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp/1.0.0)<br>NuGet [2.0.0-beta.10](https://www.nuget.org/packages/Azure.Mcp/2.0.0-beta.10) | | |
430+
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.linux-arm64/1.0.0)<br>NuGet [2.0.0-beta.10](https://www.nuget.org/packages/Azure.Mcp.linux-arm64/2.0.0-beta.10) | | |
431+
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.linux-x64/1.0.0)<br>NuGet [2.0.0-beta.10](https://www.nuget.org/packages/Azure.Mcp.linux-x64/2.0.0-beta.10) | | |
432+
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.osx-arm64/1.0.0)<br>NuGet [2.0.0-beta.10](https://www.nuget.org/packages/Azure.Mcp.osx-arm64/2.0.0-beta.10) | | |
433+
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.osx-x64/1.0.0)<br>NuGet [2.0.0-beta.10](https://www.nuget.org/packages/Azure.Mcp.osx-x64/2.0.0-beta.10) | | |
434+
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.win-arm64/1.0.0)<br>NuGet [2.0.0-beta.10](https://www.nuget.org/packages/Azure.Mcp.win-arm64/2.0.0-beta.10) | | |
435+
| Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Mcp.win-x64/1.0.0)<br>NuGet [2.0.0-beta.10](https://www.nuget.org/packages/Azure.Mcp.win-x64/2.0.0-beta.10) | | |
436436
| Unknown Display Name | NuGet [0.1.4-preview.2](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Aot/0.1.4-preview.2) | | |
437437
| Unknown Display Name | NuGet [1.0.0-preview.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Mcp.Sdk/1.0.0-preview.2) | | |
438438
| Unknown Display Name | NuGet [0.2.804](https://www.nuget.org/packages/Microsoft.Azure.Mcp.AzTypes.Internal.Compact/0.2.804) | | |

docs/azure/includes/dotnet-new.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
| Models Repository | NuGet [1.0.0-preview.6](https://www.nuget.org/packages/Azure.IoT.ModelsRepository/1.0.0-preview.6) | [docs](/dotnet/api/overview/azure/IoT.ModelsRepository-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-preview.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.ModelsRepository_1.0.0-preview.6/sdk/modelsrepository/Azure.IoT.ModelsRepository/) |
8080
| Monitor Ingestion | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Monitor.Ingestion/1.2.0) | [docs](/dotnet/api/overview/azure/Monitor.Ingestion-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Ingestion_1.2.0/sdk/monitor/Azure.Monitor.Ingestion/) |
8181
| Monitor Query | NuGet [1.7.1](https://www.nuget.org/packages/Azure.Monitor.Query/1.7.1) | [docs](/dotnet/api/overview/azure/Monitor.Query-readme) | GitHub [1.7.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query_1.7.1/sdk/monitor/Azure.Monitor.Query/) |
82+
| Monitor Query Logs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Monitor.Query.Logs/1.0.0) | [docs](/dotnet/api/overview/azure/Monitor.Query.Logs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query.Logs_1.0.0/sdk/monitor/Azure.Monitor.Query.Logs/) |
83+
| Monitor Query Metrics | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Monitor.Query.Metrics/1.0.0) | [docs](/dotnet/api/overview/azure/Monitor.Query.Metrics-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query.Metrics_1.0.0/sdk/monitor/Azure.Monitor.Query.Metrics/) |
8284
| NUnit ? Microsoft Playwright Testing | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/1.0.0-beta.4) | | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.MicrosoftPlaywrightTesting.NUnit_1.0.0-beta.4/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/) |
8385
| Online Experimentation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.OnlineExperimentation/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Analytics.OnlineExperimentation-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.OnlineExperimentation_1.0.0-beta.1/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/) |
8486
| OpenAI Assistants | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.AI.OpenAI.Assistants/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/AI.OpenAI.Assistants-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI.Assistants_1.0.0-beta.4/sdk/openai/Azure.AI.OpenAI.Assistants/) |

docs/azure/sdk/authentication/system-assigned-managed-identity.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ The output resembles the following:
6060

6161
```json
6262
{
63-
"principalId": "99999999-9999-9999-9999-999999999999",
64-
"tenantId": "33333333-3333-3333-3333-333333333333",
63+
"principalId": "aaaaaaaa-bbbb-cccc-1111-222222222222",
64+
"tenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
6565
"type": "SystemAssigned",
6666
"userAssignedIdentities": null
6767
}
@@ -120,11 +120,11 @@ az role definition list \
120120
--output table
121121
```
122122

123-
For example, to allow the managed identity with the ID of `99999999-9999-9999-9999-999999999999` read, write, and delete access to Azure Storage blob containers and data to all storage accounts in the *msdocs-dotnet-sdk-auth-example* resource group, assign the application service principal to the *Storage Blob Data Contributor* role using the following command:
123+
For example, to allow the managed identity with the ID of `aaaaaaaa-bbbb-cccc-1111-222222222222` read, write, and delete access to Azure Storage blob containers and data to all storage accounts in the *msdocs-dotnet-sdk-auth-example* resource group, assign the application service principal to the *Storage Blob Data Contributor* role using the following command:
124124

125125
```azurecli
126126
az role assignment create \
127-
--assignee 99999999-9999-9999-9999-999999999999 \
127+
--assignee aaaaaaaa-bbbb-cccc-1111-222222222222 \
128128
--role "Storage Blob Data Contributor" \
129129
--scope "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/msdocs-dotnet-sdk-auth-example"
130130
```

docs/core/compatibility/11.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ If you're migrating an app to .NET 11, the breaking changes listed here might af
1818

1919
| Title | Type of change |
2020
|-------------------------------------------------------------------|-------------------|
21+
| [DeflateStream and GZipStream write headers and footers for empty payload](core-libraries/11/deflatestream-gzipstream-empty-payload.md) | Behavioral change |
2122
| [Environment.TickCount made consistent with Windows timeout behavior](core-libraries/11/environment-tickcount-windows-behavior.md) | Behavioral change |
2223
| [MemoryStream maximum capacity updated and exception behavior changed](core-libraries/11/memorystream-max-capacity.md) | Behavioral change |
24+
| [TAR-reading APIs verify header checksums when reading](core-libraries/11/tar-checksum-validation.md) | Behavioral change |
2325

2426
## Globalization
2527

2628
| Title | Type of change |
2729
|-------|-------------------|
2830
| [Japanese Calendar minimum supported date corrected](globalization/11/japanese-calendar-min-date.md) | Behavioral change |
31+
32+
## JIT compiler
33+
34+
| Title | Type of change |
35+
|-------------------------------------------------------------------|-------------------|
36+
| [Minimum hardware requirements updated](jit/11/minimum-hardware-requirements.md) | Behavioral change |
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: "Breaking change: DeflateStream and GZipStream write headers and footers for empty payload"
3+
description: "Learn about the breaking change in .NET 11 where DeflateStream and GZipStream always write headers and footers to the output, even for empty payloads."
4+
ms.date: 01/09/2026
5+
ai-usage: ai-assisted
6+
---
7+
8+
# DeflateStream and GZipStream write headers and footers for empty payload
9+
10+
<xref:System.IO.Compression.DeflateStream> and <xref:System.IO.Compression.GZipStream> now always write format headers and footers to the output stream, even when no data is written. This ensures the output is a valid compressed stream according to the Deflate and GZip specifications.
11+
12+
## Version introduced
13+
14+
.NET 11 Preview 1
15+
16+
## Previous behavior
17+
18+
Previously, `DeflateStream` and `GZipStream` didn't produce any output if no data was written to the stream. This resulted in an empty output stream when compressing an empty input.
19+
20+
```csharp
21+
using var output = new MemoryStream();
22+
using (var deflate = new DeflateStream(output, CompressionMode.Compress))
23+
{
24+
// No data written.
25+
}
26+
Console.WriteLine(output.Length); // 0
27+
```
28+
29+
## New behavior
30+
31+
Starting in .NET 11, `DeflateStream` and `GZipStream` always write the appropriate headers and footers to the output stream, even when no data is written. This ensures the output contains valid compressed data according to the format specifications.
32+
33+
```csharp
34+
using var output = new MemoryStream();
35+
using (var deflate = new DeflateStream(output, CompressionMode.Compress))
36+
{
37+
// No data written.
38+
}
39+
Console.WriteLine(output.Length); // 2 (for Deflate) or 20 (for GZip).
40+
```
41+
42+
## Type of breaking change
43+
44+
This change is a [behavioral change](../../categories.md#behavioral-change).
45+
46+
## Reason for change
47+
48+
Deflate and GZip compression formats include delimiters for the start and end of compressed data. The correct way to compress an empty payload with these formats includes only those delimiters. Some tools don't correctly react to empty content and always expect the compressed content to contain at least the appropriate header and footer. This change ensures compatibility with such tools and produces properly formatted compressed streams according to the specifications.
49+
50+
## Recommended action
51+
52+
If the previous behavior is desired, special-case empty content to not compress it via `DeflateStream` or `GZipStream`.
53+
54+
```csharp
55+
byte[] dataToCompress = GetData();
56+
57+
if (dataToCompress.Length == 0)
58+
{
59+
// Don't compress empty data.
60+
return Array.Empty<byte>();
61+
}
62+
63+
using var output = new MemoryStream();
64+
using (var deflate = new DeflateStream(output, CompressionMode.Compress))
65+
{
66+
deflate.Write(dataToCompress);
67+
}
68+
return output.ToArray();
69+
```
70+
71+
If you need to distinguish between empty and nonempty compressed streams, track whether any data was written or check the original uncompressed data length before compression.
72+
73+
## Affected APIs
74+
75+
- <xref:System.IO.Compression.DeflateStream?displayProperty=fullName>
76+
- <xref:System.IO.Compression.GZipStream?displayProperty=fullName>

0 commit comments

Comments
 (0)