From c313784946229f4a35dfb310e8ccd3d3c0291d15 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 19:50:56 +0000 Subject: [PATCH 1/3] Initial plan From 0de50f87e3e3114edb3499e51d81130d6e6fa2e4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Oct 2025 19:57:17 +0000 Subject: [PATCH 2/3] Add breaking change documentation for Type.MakeGenericSignatureType argument validation Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/10.0.md | 1 + .../makegeneric-signaturetype-validation.md | 46 +++++++++++++++++++ docs/core/compatibility/toc.yml | 4 ++ 3 files changed, 51 insertions(+) create mode 100644 docs/core/compatibility/reflection/10.0/makegeneric-signaturetype-validation.md diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 7d0c66625293f..37a65d3970e4c 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -53,6 +53,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [MacCatalyst version normalization](core-libraries/10.0/maccatalyst-version-normalization.md) | Behavioral change | Preview 1 | | [.NET runtime no longer provides default termination signal handlers](core-libraries/10.0/sigterm-signal-handler.md) | Behavioral change | Preview 5 | | [System.Linq.AsyncEnumerable included in core libraries](core-libraries/10.0/asyncenumerable.md) | Source incompatible | Preview 1 | +| [Type.MakeGenericSignatureType argument validation](reflection/10.0/makegeneric-signaturetype-validation.md) | Behavioral change | Preview 3 | | [YMM embedded rounding removed from AVX10.2](core-libraries/10.0/ymm-embedded-rounding.md) | Behavioral change | Preview 5 | ## Cryptography diff --git a/docs/core/compatibility/reflection/10.0/makegeneric-signaturetype-validation.md b/docs/core/compatibility/reflection/10.0/makegeneric-signaturetype-validation.md new file mode 100644 index 0000000000000..dfee952bf9f87 --- /dev/null +++ b/docs/core/compatibility/reflection/10.0/makegeneric-signaturetype-validation.md @@ -0,0 +1,46 @@ +--- +title: "Breaking change: Type.MakeGenericSignatureType argument validation" +description: Learn about the .NET 10 breaking change in core .NET libraries where Type.MakeGenericSignatureType validates that the genericTypeDefinition argument is a generic type definition. +ms.date: 10/13/2025 +ai-usage: ai-assisted +ms.custom: https://github.com/dotnet/docs/issues/496357 +--- +# Type.MakeGenericSignatureType argument validation + +Starting in .NET 10, the API validates that the `genericTypeDefinition` argument is a generic type definition. + +## Version introduced + +.NET 10 Preview 3 + +## Previous behavior + +Previously, accepted any type for the `genericTypeDefinition` argument, including non-generic types. + +## New behavior + +Starting in .NET 10 Preview 3, requires the `genericTypeDefinition` argument to be a generic type definition. If the argument is not a generic type definition, the method throws an . + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The type created by had non-sensical behavior when the `genericTypeDefinition` argument was not a generic type definition. + +## Recommended action + +Avoid calling for types that are not generic type definitions. For example: + +```csharp +// Before +Type instantiatedType = Type.MakeGenericSignatureType(originalType, instantiation); + +// After +Type instantiatedType = originalType.IsGenericTypeDefinition ? Type.MakeGenericSignatureType(originalType, instantiation) : originalType; +``` + +## Affected APIs + +- diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 18c08be85a233..2316a0e3a1275 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -110,6 +110,10 @@ items: href: networking/10.0/default-http-streaming.md - name: "'Uri' length limits removed" href: networking/10.0/uri-length-limits-removed.md + - name: Reflection + items: + - name: Type.MakeGenericSignatureType argument validation + href: reflection/10.0/makegeneric-signaturetype-validation.md - name: SDK and MSBuild items: - name: .NET CLI `--interactive` defaults to `true` in user scenarios From c909485dac6709d011f19945039ff5d7a0669a1c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Oct 2025 01:12:35 +0000 Subject: [PATCH 3/3] Address review feedback: rename folder to 10, update issue number, and remove Preview 3 from New behavior section Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/10.0.md | 2 +- .../{10.0 => 10}/makegeneric-signaturetype-validation.md | 4 ++-- docs/core/compatibility/toc.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename docs/core/compatibility/reflection/{10.0 => 10}/makegeneric-signaturetype-validation.md (82%) diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 37a65d3970e4c..57a6e8918e3db 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -53,7 +53,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [MacCatalyst version normalization](core-libraries/10.0/maccatalyst-version-normalization.md) | Behavioral change | Preview 1 | | [.NET runtime no longer provides default termination signal handlers](core-libraries/10.0/sigterm-signal-handler.md) | Behavioral change | Preview 5 | | [System.Linq.AsyncEnumerable included in core libraries](core-libraries/10.0/asyncenumerable.md) | Source incompatible | Preview 1 | -| [Type.MakeGenericSignatureType argument validation](reflection/10.0/makegeneric-signaturetype-validation.md) | Behavioral change | Preview 3 | +| [Type.MakeGenericSignatureType argument validation](reflection/10/makegeneric-signaturetype-validation.md) | Behavioral change | Preview 3 | | [YMM embedded rounding removed from AVX10.2](core-libraries/10.0/ymm-embedded-rounding.md) | Behavioral change | Preview 5 | ## Cryptography diff --git a/docs/core/compatibility/reflection/10.0/makegeneric-signaturetype-validation.md b/docs/core/compatibility/reflection/10/makegeneric-signaturetype-validation.md similarity index 82% rename from docs/core/compatibility/reflection/10.0/makegeneric-signaturetype-validation.md rename to docs/core/compatibility/reflection/10/makegeneric-signaturetype-validation.md index dfee952bf9f87..95de4af49cc77 100644 --- a/docs/core/compatibility/reflection/10.0/makegeneric-signaturetype-validation.md +++ b/docs/core/compatibility/reflection/10/makegeneric-signaturetype-validation.md @@ -3,7 +3,7 @@ title: "Breaking change: Type.MakeGenericSignatureType argument validation" description: Learn about the .NET 10 breaking change in core .NET libraries where Type.MakeGenericSignatureType validates that the genericTypeDefinition argument is a generic type definition. ms.date: 10/13/2025 ai-usage: ai-assisted -ms.custom: https://github.com/dotnet/docs/issues/496357 +ms.custom: https://github.com/dotnet/docs/issues/48902 --- # Type.MakeGenericSignatureType argument validation @@ -19,7 +19,7 @@ Previously, requires the `genericTypeDefinition` argument to be a generic type definition. If the argument is not a generic type definition, the method throws an . +Starting in .NET 10, requires the `genericTypeDefinition` argument to be a generic type definition. If the argument is not a generic type definition, the method throws an . ## Type of breaking change diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 2316a0e3a1275..70aa790903370 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -113,7 +113,7 @@ items: - name: Reflection items: - name: Type.MakeGenericSignatureType argument validation - href: reflection/10.0/makegeneric-signaturetype-validation.md + href: reflection/10/makegeneric-signaturetype-validation.md - name: SDK and MSBuild items: - name: .NET CLI `--interactive` defaults to `true` in user scenarios