Skip to content

Commit 4caf67e

Browse files
Merge pull request #44645 from dotnet/main
Merge main into live
2 parents b193f44 + 6bad9ed commit 4caf67e

File tree

22 files changed

+825
-170
lines changed

22 files changed

+825
-170
lines changed

docs/azure/includes/dotnet-all.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| Azure.Core.Expressions.DataFactory | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Core.Expressions.DataFactory/1.0.0) | [docs](/dotnet/api/overview/azure/Core.Expressions.DataFactory-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Expressions.DataFactory_1.0.0/sdk/core/Azure.Core.Expressions.DataFactory/) |
1313
| Calling Server | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Communication.CallingServer/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Communication.CallingServer-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallingServer_1.0.0-beta.3/sdk/communication/Azure.Communication.CallingServer/) |
1414
| Code Transparency | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Security.CodeTransparency/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Security.CodeTransparency-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.CodeTransparency_1.0.0-beta.2/sdk/confidentialledger/Azure.Security.CodeTransparency/) |
15-
| Communication Call Automation | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.3.0)<br>NuGet [1.4.0-beta.1](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.4.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.CallAutomation-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.3.0/sdk/communication/Azure.Communication.CallAutomation/)<br>GitHub [1.4.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.4.0-beta.1/sdk/communication/Azure.Communication.CallAutomation/) |
15+
| Communication Call Automation | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.3.0)<br>NuGet [1.4.0-beta.2](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.4.0-beta.2) | [docs](/dotnet/api/overview/azure/Communication.CallAutomation-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.3.0/sdk/communication/Azure.Communication.CallAutomation/)<br>GitHub [1.4.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.4.0-beta.2/sdk/communication/Azure.Communication.CallAutomation/) |
1616
| Communication Chat | NuGet [1.3.1](https://www.nuget.org/packages/Azure.Communication.Chat/1.3.1) | [docs](/dotnet/api/overview/azure/Communication.Chat-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Chat_1.3.1/sdk/communication/Azure.Communication.Chat/) |
1717
| Communication Common | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Communication.Common/1.3.0)<br>NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Common/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.Common-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_1.3.0/sdk/communication/Azure.Communication.Common/)<br>GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_2.0.0-beta.1/sdk/communication/Azure.Communication.Common/) |
1818
| Communication Email | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Communication.Email/1.0.1)<br>NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.Communication.Email/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/Communication.Email-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Email_1.0.1/sdk/communication/Azure.Communication.Email/)<br>GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Email_1.1.0-beta.2/sdk/communication/Azure.Communication.Email/) |
@@ -496,7 +496,7 @@
496496
| Functions extension for Notification Hubs | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.NotificationHubs/1.3.0) | | GitHub [1.3.0](https://github.com/Azure/azure-webjobs-sdk-extensions) |
497497
| Functions extension for RabbitMQ | NuGet [2.0.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.RabbitMQ/2.0.3) | | GitHub [2.0.3](https://github.com/Azure/azure-functions-rabbitmq-extension/tree/v0.2.2029-beta) |
498498
| Functions extension for script abstractions | NuGet [1.0.4-preview](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Script.Abstractions/1.0.4-preview) | | |
499-
| Functions extension for SendGrid | NuGet [3.0.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SendGrid/3.0.3) | | GitHub [3.0.3](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.0/src/WebJobs.Extensions.SendGrid) |
499+
| Functions extension for SendGrid | NuGet [3.1.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SendGrid/3.1.0) | | GitHub [3.1.0](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.0/src/WebJobs.Extensions.SendGrid) |
500500
| Functions extension for Sources | NuGet [3.0.41](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Sources/3.0.41) | | GitHub [3.0.41](https://github.com/Azure/azure-webjobs-sdk) |
501501
| Functions extension for Storage Timers | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Timers.Storage/1.0.0) | | |
502502
| Functions extension for Twilio | NuGet [3.0.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Twilio/3.0.2) | | GitHub [3.0.2](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.0/src/WebJobs.Extensions.Twilio) |

docs/azure/includes/dotnet-new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| Azure.Core.Expressions.DataFactory | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Core.Expressions.DataFactory/1.0.0) | [docs](/dotnet/api/overview/azure/Core.Expressions.DataFactory-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Expressions.DataFactory_1.0.0/sdk/core/Azure.Core.Expressions.DataFactory/) |
1313
| Calling Server | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Communication.CallingServer/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Communication.CallingServer-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallingServer_1.0.0-beta.3/sdk/communication/Azure.Communication.CallingServer/) |
1414
| Code Transparency | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Security.CodeTransparency/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Security.CodeTransparency-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.CodeTransparency_1.0.0-beta.2/sdk/confidentialledger/Azure.Security.CodeTransparency/) |
15-
| Communication Call Automation | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.3.0)<br>NuGet [1.4.0-beta.1](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.4.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.CallAutomation-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.3.0/sdk/communication/Azure.Communication.CallAutomation/)<br>GitHub [1.4.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.4.0-beta.1/sdk/communication/Azure.Communication.CallAutomation/) |
15+
| Communication Call Automation | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.3.0)<br>NuGet [1.4.0-beta.2](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.4.0-beta.2) | [docs](/dotnet/api/overview/azure/Communication.CallAutomation-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.3.0/sdk/communication/Azure.Communication.CallAutomation/)<br>GitHub [1.4.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.4.0-beta.2/sdk/communication/Azure.Communication.CallAutomation/) |
1616
| Communication Chat | NuGet [1.3.1](https://www.nuget.org/packages/Azure.Communication.Chat/1.3.1) | [docs](/dotnet/api/overview/azure/Communication.Chat-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Chat_1.3.1/sdk/communication/Azure.Communication.Chat/) |
1717
| Communication Common | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Communication.Common/1.3.0)<br>NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Common/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.Common-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_1.3.0/sdk/communication/Azure.Communication.Common/)<br>GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_2.0.0-beta.1/sdk/communication/Azure.Communication.Common/) |
1818
| Communication Email | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Communication.Email/1.0.1)<br>NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.Communication.Email/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/Communication.Email-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Email_1.0.1/sdk/communication/Azure.Communication.Email/)<br>GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Email_1.1.0-beta.2/sdk/communication/Azure.Communication.Email/) |

docs/core/compatibility/10.0.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: Breaking changes in .NET 10
33
titleSuffix: ""
44
description: Navigate to the breaking changes in .NET 10.
5-
ms.date: 12/19/2024
5+
ms.date: 01/30/2025
6+
ai-usage: ai-assisted
67
no-loc: [Blazor, Razor, Kestrel]
78
---
89
# Breaking changes in .NET 10
@@ -17,6 +18,30 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
1718
1819
## Core .NET libraries
1920

20-
| Title | Type of change | Introduced version |
21-
|------------------------------------------------------------------------------------------|---------------------|--------------------|
22-
| [API obsoletions with non-default diagnostic IDs](core-libraries/10.0/obsolete-apis.md) | Source incompatible | Preview 1 |
21+
| Title | Type of change | Introduced version |
22+
|----------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------|
23+
| [API obsoletions with non-default diagnostic IDs](core-libraries/10.0/obsolete-apis.md) | Source incompatible | Preview 1 |
24+
| [ActivitySource.CreateActivity and ActivitySource.StartActivity behavior change](core-libraries/10.0/activity-sampling.md) | Behavioral change | Preview 1 |
25+
| [C# 14 overload resolution with span parameters](core-libraries/10.0/csharp-overload-resolution.md) | Behavioral change | Preview 1 |
26+
| [Consistent shift behavior in generic math](core-libraries/10.0/generic-math.md) | Behavioral change | Preview 1 |
27+
| [LDAP DirectoryControl parsing is now more stringent](core-libraries/10.0/ldap-directorycontrol-parsing.md) | Behavioral change | Preview 1 |
28+
| [MacCatalyst version normalization](core-libraries/10.0/maccatalyst-version-normalization.md) | Behavioral change | Preview 1 |
29+
30+
## Globalization
31+
32+
| Title | Type of change | Introduced version |
33+
|-------------------------------------------------------------------------------------------------------|-------------------|--------------------|
34+
| [Environment variable renamed to DOTNET_ICU_VERSION_OVERRIDE](globalization/10.0/version-override.md) | Behavioral change | Preview 1 |
35+
36+
## Cryptography
37+
38+
| Title | Type of change | Introduced version |
39+
|--------------------------------------------------------------------------------------------------------|-------------------|--------------------|
40+
| [X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md) | Behavioral change | Preview 1 |
41+
42+
## Windows Forms
43+
44+
| Title | Type of change | Introduced version |
45+
|-------------------------------------------------------------------------------------------------------------------|---------------------|--------------------|
46+
| [Renamed parameter in HtmlElement.InsertAdjacentElement](windows-forms/10.0/insertadjacentelement-orientation.md) | Source incompatible | Preview 1 |
47+
| [TreeView checkbox image truncation](windows-forms/10.0/treeview-text-location.md) | Behavioral change | Preview 1 |
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: "Breaking change: ActivitySource.CreateActivity and ActivitySource.StartActivity behavior changes"
3+
description: Learn about the .NET 10.0 breaking change in core .NET libraries where ActivitySource.CreateActivity and ActivitySource.StartActivity behavior is modified.
4+
ms.date: 01/30/2025
5+
ai-usage: ai-assisted
6+
---
7+
# ActivitySource.CreateActivity and ActivitySource.StartActivity behavior change
8+
9+
The <xref:System.Diagnostics.ActivitySource.CreateActivity*?displayProperty=nameWithType> and <xref:System.Diagnostics.ActivitySource.StartActivity*?displayProperty=nameWithType> APIs only return an <xref:System.Diagnostics.Activity> when there's a registered listener that decides the instance should be created. This is generally known as sampling.
10+
11+
The <xref:System.Diagnostics.ActivitySamplingResult?displayProperty=nameWithType> enum defines the possible sampling decisions.
12+
13+
When creating an `Activity` without a parent, `ActivitySamplingResult` drives whether the `Activity` is created and then how the `Recorded` and `IsAllDataRequested` properties are set:
14+
15+
|ActivitySamplingResult|Activity created|Activity.Recorded|Activity.IsAllDataRequested|
16+
|---|---|---|---|
17+
|None|No|||
18+
|PropagationData|Yes|False|False|
19+
|AllData|Yes|False|True|
20+
|AllDataAndRecorded|Yes|True|True|
21+
22+
It is also possible to create an `Activity` with a parent. The parent could be in the same process, or it could be a remote parent propagated to the current process.
23+
24+
## Previous behavior
25+
26+
Previously, when creating an `Activity` as `PropagationData` with a parent marked as `Recorded`, the `Recorded` and `IsAllDataRequested` properties were set as follows:
27+
28+
|ActivitySamplingResult|Activity created|Activity.Recorded|Activity.IsAllDataRequested|
29+
|---|---|---|---|
30+
|PropagationData|Yes|True|False|
31+
32+
## New behavior
33+
34+
Starting in .NET 10, when you create an `Activity` as `PropagationData` with a parent marked as `Recorded`, the `Recorded` and `IsAllDataRequested` properties are set as follows:
35+
36+
|ActivitySamplingResult|Activity created|Activity.Recorded|Activity.IsAllDataRequested|
37+
|---|---|---|---|
38+
|PropagationData|Yes|False|False|
39+
40+
## Version introduced
41+
42+
.NET 10 Preview 1
43+
44+
## Type of breaking change
45+
46+
This change is a [behavioral change](../../categories.md#behavioral-change).
47+
48+
## Reason for change
49+
50+
The previous behavior did not follow the OpenTelemetry specification.
51+
52+
## Recommended action
53+
54+
If you've implemented `ActivityListener.Sample` directly AND use `ActivitySamplingResult.PropagationData`, verify that you're not reliant on the flawed behavior. To restore the previous behavior, you can set `Activity.ActivityTraceFlags` to `Recorded` after the `CreateActivity` or `StartActivity` call.
55+
56+
If you use OpenTelemetry .NET and have customized the sampler, verify your sampler configuration. The default OpenTelemetry .NET configuration uses a parent-based algorithm that isn't impacted.
57+
58+
## Affected APIs
59+
60+
- <xref:System.Diagnostics.ActivitySource.CreateActivity*?displayProperty=fullName>
61+
- <xref:System.Diagnostics.ActivitySource.StartActivity*?displayProperty=fullName>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Breaking change: C# 14 overload resolution with span parameters"
3+
description: Learn about the .NET 10 breaking change in core .NET libraries where overloads with span parameters are applicable in more scenarios.
4+
ms.date: 01/30/2025
5+
ai-usage: ai-assisted
6+
---
7+
# C# 14 overload resolution with span parameters
8+
9+
C# 14, which ships with .NET 10, introduces new [built-in span conversions and type inference rules](https://github.com/dotnet/csharplang/issues/7905). Those changes make overloads with span parameters applicable in more scenarios.
10+
11+
## Previous behavior
12+
13+
In C# 13 and earlier, an extension method taking a `ReadOnlySpan<T>` or `Span<T>` receiver was not applicable to a value of type `T[]`. Therefore, only non-span extension methods like the ones from the `System.Linq.Enumerable` class were usually bound inside Expression lambdas.
14+
15+
## New behavior
16+
17+
In C# 14 and later, methods with `ReadOnlySpan<T>` or `Span<T>` parameters can participate in type inference or be used as extension methods in more scenarios. This makes span-based methods like the ones from the `System.MemoryExtensions` class bind in more scenarios, including inside Expression lambdas where they will cause run-time exceptions when compiled with interpretation.
18+
19+
## Version introduced
20+
21+
.NET 10 Preview 1
22+
23+
## Type of breaking change
24+
25+
This change is a [behavioral change](../../categories.md#behavioral-change).
26+
27+
## Reason for change
28+
29+
The C# language feature allows simplified API design and usage (for example, one <xref:System.ReadOnlySpan`1> extension method can apply to both spans and arrays).
30+
31+
## Recommended action
32+
33+
If you need to continue using Expression interpretation, make sure the non-span overloads are bound, for example, by casting arguments to the exact types the method signature takes or calling the extension methods as explicit static invocations:
34+
35+
```csharp
36+
using System;
37+
using System.Collections.Generic;
38+
using System.Linq;
39+
using System.Linq.Expressions;
40+
41+
M((array, num) => array.Contains(num)); // fails, binds to MemoryExtensions.Contains
42+
M((array, num) => ((IEnumerable<int>)array).Contains(num)); // ok, binds to Enumerable.Contains
43+
M((array, num) => array.AsEnumerable().Contains(num)); // ok, binds to Enumerable.Contains
44+
M((array, num) => Enumerable.Contains(array, num)); // ok, binds to Enumerable.Contains
45+
46+
void M(Expression<Func<int[], int, bool>> e) => e.Compile(preferInterpretation: true);
47+
```
48+
49+
## Affected APIs
50+
51+
- <xref:System.Linq.Expressions.Expression`1.Compile*?displayProperty=fullName>

0 commit comments

Comments
 (0)