Skip to content

Commit dddea78

Browse files
Merge pull request #49916 from dotnet/main
Merge main into live
2 parents 5c652e2 + e6dfff8 commit dddea78

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+626
-646
lines changed

.openpublishing.redirection.orleans.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,26 @@
4343
{
4444
"source_path_from_root": "/docs/orleans/implementation/cluster-configuration.md",
4545
"redirect_url": "/dotnet/orleans/implementation/cluster-management"
46+
},
47+
{
48+
"source_path_from_root": "/docs/orleans/deployment/multi-cluster-support/global-single-instance.md",
49+
"redirect_url": "/dotnet/orleans/deployment/"
50+
},
51+
{
52+
"source_path_from_root": "/docs/orleans/deployment/multi-cluster-support/gossip-channels.md",
53+
"redirect_url": "/dotnet/orleans/deployment/"
54+
},
55+
{
56+
"source_path_from_root": "/docs/orleans/deployment/multi-cluster-support/multi-cluster-configuration.md",
57+
"redirect_url": "/dotnet/orleans/deployment/"
58+
},
59+
{
60+
"source_path_from_root": "/docs/orleans/deployment/multi-cluster-support/overview.md",
61+
"redirect_url": "/dotnet/orleans/deployment/"
62+
},
63+
{
64+
"source_path_from_root": "/docs/orleans/deployment/multi-cluster-support/silo-configuration.md",
65+
"redirect_url": "/dotnet/orleans/deployment/"
4666
}
4767

4868
]

docs/azure/includes/dotnet-all.md

Lines changed: 30 additions & 31 deletions
Large diffs are not rendered by default.

docs/azure/includes/dotnet-new.md

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

docs/core/compatibility/10.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
110110
| [Streaming HTTP responses enabled by default in browser HTTP clients](networking/10.0/default-http-streaming.md) | Behavioral change |
111111
| [`Uri` length limits removed](networking/10.0/uri-length-limits-removed.md) | Behavioral change |
112112

113+
## Reflection
114+
115+
| Title | Type of change | Introduced version |
116+
|-------|-------------------|--------------------|
117+
| [More restricted annotations on InvokeMember/FindMembers/DeclaredMembers](reflection/10/ireflect-damt-annotations.md) | Behavioral/source incompatible | |
118+
113119
## SDK and MSBuild
114120

115121
| Title | Type of change |
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: "Breaking change: More restricted annotations on InvokeMember/FindMembers/DeclaredMembers"
3+
description: "Learn about the breaking change in .NET 10 where System.Reflection APIs InvokeMember, FindMembers, and DeclaredMembers use more restricted annotations instead of DynamicallyAccessedMemberTypes.All."
4+
ms.date: 10/09/2025
5+
ai-usage: ai-generated
6+
---
7+
8+
# More restricted annotations on InvokeMember/FindMembers/DeclaredMembers
9+
10+
Starting in .NET 10, the <xref:System.Reflection> APIs <xref:System.Reflection.IReflect.InvokeMember%2A>, <xref:System.Type.FindMembers%2A>, and <xref:System.Reflection.TypeInfo.DeclaredMembers> use more restricted annotations instead of <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All?displayProperty=nameWithType>.
11+
12+
This change affects scenarios where developers implement the <xref:System.Reflection.IReflect> interface or derive from <xref:System.Reflection.TypeInfo>. The previous use of <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All?displayProperty=nameWithType> was overly permissive and could lead to unintended behavior, such as capturing interface methods implemented by a class or generating warnings due to unsafe reflection calls.
13+
14+
## Version introduced
15+
16+
.NET 10
17+
18+
## Previous behavior
19+
20+
Previously, the [affected APIs](#affected-apis) used the <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All?displayProperty=nameWithType> annotation, which was overly permissive. This could result in capturing additional members, such as interface methods implemented by a class, and potentially cause runtime warnings or unsafe reflection calls.
21+
22+
## New behavior
23+
24+
The [affected APIs](#affected-apis) now use more restricted annotations, which provide better control over the members captured during reflection.
25+
26+
## Type of breaking change
27+
28+
This change is a [behavioral change](../../categories.md#behavioral-change) and can affect [source compatibility](../../categories.md#source-compatibility).
29+
30+
## Reason for change
31+
32+
The change was introduced to improve the accuracy of annotations in <xref:System.Reflection> APIs and to address issues caused by the overly permissive <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All?displayProperty=nameWithType> annotation. This ensures better compatibility with trimming and reflection scenarios, reduces run-time warnings, and prevents unsafe reflection calls.
33+
34+
## Recommended action
35+
36+
If you implement <xref:System.Reflection.IReflect> or derive from <xref:System.Reflection.TypeInfo>, review your code and update annotations to align with the new behavior. Specifically:
37+
38+
1. Replace <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All?displayProperty=nameWithType> annotations with more restricted annotations, such as <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods?displayProperty=nameWithType>, <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods?displayProperty=nameWithType>, or other appropriate types.
39+
40+
The following code snippet shows an example.
41+
42+
```csharp
43+
class MyType : IReflect
44+
{
45+
[DynamicallyAccessedMembers(
46+
DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields |
47+
DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods |
48+
DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties |
49+
DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)]
50+
public object InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target,
51+
object?[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters)
52+
{ }
53+
}
54+
```
55+
56+
1. Test reflection scenarios to ensure that the updated annotations capture the intended members and don't introduce run-time errors or warnings.
57+
58+
For more information on `DynamicallyAccessedMembers` annotations and their usage, see [Prepare .NET libraries for trimming](../../../deploying/trimming/prepare-libraries-for-trimming.md).
59+
60+
## Affected APIs
61+
62+
- <xref:System.Reflection.IReflect.InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[])?displayProperty=fullName>
63+
- <xref:System.Type.FindMembers(System.Reflection.MemberTypes,System.Reflection.BindingFlags,System.Reflection.MemberFilter,System.Object)?displayProperty=fullName>
64+
- <xref:System.Reflection.TypeInfo.DeclaredMembers?displayProperty=fullName>

docs/core/compatibility/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ items:
122122
href: networking/10.0/uri-length-limits-removed.md
123123
- name: Reflection
124124
items:
125+
- name: More restricted annotations on InvokeMember/FindMembers/DeclaredMembers
126+
href: reflection/10/ireflect-damt-annotations.md
125127
- name: Type.MakeGenericSignatureType argument validation
126128
href: reflection/10/makegeneric-signaturetype-validation.md
127129
- name: SDK and MSBuild

docs/core/install/linux-debian.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.custom: linux-related-content
99

1010
# Install the .NET SDK or the .NET Runtime on Debian
1111

12-
This article describes how to install .NET on Debian. When a Debian version falls out of support, .NET is no longer supported with that version. However, these instructions may help you to get .NET running on those versions, even though it isn't supported.
12+
This article describes how to install .NET on Debian. When a Debian version falls out of support, .NET is no longer supported with that version. However, these instructions might help you to get .NET running on those versions, even though it isn't supported.
1313

1414
[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)]
1515

@@ -42,8 +42,6 @@ sudo dpkg -i packages-microsoft-prod.deb
4242
rm packages-microsoft-prod.deb
4343
```
4444

45-
[!INCLUDE [linux-release-wait](includes/linux-release-wait.md)]
46-
4745
# [.NET 10](#tab/dotnet10)
4846

4947
[!INCLUDE [linux-install-package-manager-x64-arm64](includes/linux-install-package-manager-x64-arm64.md)]
@@ -76,8 +74,6 @@ rm packages-microsoft-prod.deb
7674

7775
# [.NET 10](#tab/dotnet10)
7876

79-
[!INCLUDE [linux-release-wait](includes/linux-release-wait.md)]
80-
8177
[!INCLUDE [linux-install-package-manager-x64-arm64](includes/linux-install-package-manager-x64-arm64.md)]
8278

8379
[!INCLUDE [linux-apt-install-100](includes/linux-install-100-apt.md)]
@@ -98,18 +94,18 @@ rm packages-microsoft-prod.deb
9894

9995
## Use APT to update .NET
10096

101-
When a new patch release is available for .NET, you can simply upgrade it through APT with the following commands:
97+
When a new patch release is available for .NET, you can upgrade it through APT with the following commands:
10298

10399
```bash
104100
sudo apt-get update
105101
sudo apt-get upgrade
106102
```
107103

108-
If you've upgraded your Linux distribution since installing .NET, you may need to reconfigure the Microsoft package repository. Run the installation instructions for your current distribution version to upgrade to the appropriate package repository for .NET updates.
104+
If you upgraded your Linux distribution since installing .NET, you might need to reconfigure the Microsoft package repository. Run the installation instructions for your current distribution version to upgrade to the appropriate package repository for .NET updates.
109105

110106
## Troubleshooting
111107

112-
This section provides information on common errors you may get while using APT to install .NET.
108+
This section provides information on common errors you might get while using APT to install .NET.
113109

114110
### Unable to find package
115111

@@ -123,7 +119,7 @@ If you're using Debian 12 or later, try the following commands:
123119

124120
[!INCLUDE [package-manager-failed-to-find-deb-new](includes/package-manager-failed-to-find-deb-new.md)]
125121

126-
If you're using a Debian version prior to 12, try the following commands:
122+
If you're using a Debian version older than 12, try the following commands:
127123

128124
[!INCLUDE [package-manager-failed-to-find-deb-classic](includes/package-manager-failed-to-find-deb-classic.md)]
129125

docs/core/install/linux-fedora.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The following table is a list of currently supported .NET releases and the versi
2626
|--------|----------|
2727
| 43 | 10, 9, 8 |
2828
| 42 | 10, 9, 8 |
29-
| 41 | 9, 8 |
29+
| 41 | 10, 9, 8 |
3030

3131
[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)]
3232

docs/core/install/linux-opensuse.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Install .NET on openSUSE Leap
33
description: Learn about which versions of .NET SDK and .NET Runtime are supported, and how to install .NET on openSUSE Leap.
44
author: adegeo
55
ms.author: adegeo
6-
ms.date: 11/07/2025
6+
ms.date: 11/14/2025
77
ms.custom: linux-related-content
88
---
99

@@ -46,20 +46,22 @@ sudo chown root:root /etc/zypp/repos.d/microsoft-prod.repo
4646

4747
# [.NET 10](#tab/dotnet10)
4848

49-
[!INCLUDE [linux-release-wait](includes/linux-release-wait.md)]
50-
5149
[!INCLUDE [linux-install-package-manager-x64-arm64](includes/linux-install-package-manager-x64-arm64.md)]
5250

5351
[!INCLUDE [linux-zyp-install-100](includes/linux-install-100-zyp.md)]
5452

5553
# [.NET 9](#tab/dotnet9)
5654

55+
openSUSE Leap 16 is newly supported with .NET. The packages for .NET 9 aren't published yet.
56+
5757
[!INCLUDE [linux-install-package-manager-x64-only](includes/linux-install-package-manager-x64-only.md)]
5858

5959
[!INCLUDE [linux-zyp-install-90](includes/linux-install-90-zyp.md)]
6060

6161
# [.NET 8](#tab/dotnet8)
6262

63+
openSUSE Leap 16 is newly supported with .NET. The packages for .NET 8 aren't published yet.
64+
6365
[!INCLUDE [linux-install-package-manager-x64-only](includes/linux-install-package-manager-x64-only.md)]
6466

6567
[!INCLUDE [linux-zyp-install-80](includes/linux-install-80-zyp.md)]

docs/core/install/linux-rhel.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Install .NET on RHEL and CentOS Stream
33
description: Learn about which versions of .NET are supported, and how to install .NET on Red Hat Enterprise Linux and CentOS Stream.
44
author: adegeo
55
ms.author: adegeo
6-
ms.date: 11/07/2025
6+
ms.date: 11/14/2025
77
ms.custom: linux-related-content
88
---
99

@@ -15,7 +15,7 @@ ms.custom: linux-related-content
1515

1616
## Register your Red Hat subscription
1717

18-
To install .NET from Red Hat on RHEL, you first need to register using the Red Hat Subscription Manager. If this hasn't been done on your system, or if you're unsure, see the [Red Hat Product Documentation for .NET](https://access.redhat.com/documentation/en-us/net/8.0).
18+
To install .NET from Red Hat on RHEL, you first need to register using the Red Hat Subscription Manager. If this hasn't been done on your system, or if you're unsure, see the [Red Hat Product Documentation for .NET](https://access.redhat.com/documentation/en-us/net/10.0).
1919

2020
> [!IMPORTANT]
2121
> The previous statement doesn't apply to CentOS Stream.
@@ -28,7 +28,7 @@ The following table is a list of currently supported .NET releases on both RHEL
2828
|---------------------------------------|----------|
2929
| [RHEL 10](#rhel-10) | 10, 9, 8 |
3030
| [RHEL 9](#rhel-9) | 10, 9, 8 |
31-
| [RHEL 8](#rhel-8) | 9, 8 |
31+
| [RHEL 8](#rhel-8) | 10, 9, 8 |
3232
| [CentOS Stream 10](#centos-stream-10) | 10, 9, 8 |
3333
| [CentOS Stream 9](#centos-stream-9) | 10, 9, 8 |
3434

@@ -44,8 +44,6 @@ The following table is a list of currently supported .NET releases on both RHEL
4444

4545
## RHEL 10
4646

47-
[!INCLUDE [linux-release-wait](includes/linux-release-wait.md)]
48-
4947
.NET is included in the [AppStream repositories](https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle) for RHEL 10.
5048

5149
[!INCLUDE [linux-dnf-install-100](includes/linux-install-100-dnf.md)]
@@ -60,7 +58,7 @@ The following table is a list of currently supported .NET releases on both RHEL
6058

6159
.NET is included in the [AppStream repositories](https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle) for RHEL 8.
6260

63-
[!INCLUDE [linux-dnf-install-90](includes/linux-install-90-dnf.md)]
61+
[!INCLUDE [linux-dnf-install-100](includes/linux-install-100-dnf.md)]
6462

6563
## CentOS Stream 10
6664

0 commit comments

Comments
 (0)