Skip to content

Update Reflection.Emit docs to clarify framework support#51035

Merged
gewarren merged 3 commits intodotnet:mainfrom
gewarren:reflection-emit
Jan 15, 2026
Merged

Update Reflection.Emit docs to clarify framework support#51035
gewarren merged 3 commits intodotnet:mainfrom
gewarren:reflection-emit

Conversation

@gewarren
Copy link
Copy Markdown
Contributor

@gewarren gewarren commented Jan 13, 2026

Fixes #50740.


Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/csharp/advanced-topics/reflection-and-attributes/index.md Attributes
docs/framework/app-domains/how-to-load-assemblies-into-an-application-domain.md How to: Load Assemblies into an Application Domain
docs/framework/app-domains/index.md "Programming with Application Domains and Assemblies"
docs/framework/app-domains/use.md Using Application Domains
docs/framework/reflection-and-codedom/reflection-for-windows-store-apps.md Reflection in the .NET Framework for Windows Store Apps
docs/framework/reflection-and-codedom/toc.yml docs/framework/reflection-and-codedom/toc
docs/fundamentals/reflection/dynamically-loading-and-using-types.md Dynamically load and use types
docs/fundamentals/reflection/get-type-member-information.md "How to: Get type and member information by using reflection"
docs/fundamentals/reflection/how-to-define-a-generic-method-with-reflection-emit.md How to: Define a generic method with reflection emit (.NET Framework)
docs/fundamentals/reflection/how-to-define-a-generic-type-with-reflection-emit.md docs/fundamentals/reflection/how-to-define-a-generic-type-with-reflection-emit
docs/fundamentals/reflection/how-to-examine-and-instantiate-generic-types-with-reflection.md How to: Examine and instantiate generic types with reflection
docs/fundamentals/reflection/how-to-hook-up-a-delegate-using-reflection.md How to: Hook up a delegate using reflection
docs/fundamentals/reflection/overview.md Reflection in .NET
docs/fundamentals/runtime-libraries/system-reflection-emit-persistedassemblybuilder.md System.Reflection.Emit.PersistedAssemblyBuilder class
docs/fundamentals/toc.yml docs/fundamentals/toc
docs/standard/assembly/inspect-contents-using-metadataloadcontext.md How to: Inspect assembly contents using MetadataLoadContext
docs/visual-basic/language-reference/error-messages/type-of-member-membername-is-not-cls-compliant.md "Type of member '' is not CLS-compliant"
docs/visual-basic/language-reference/error-messages/underlying-type-typename-of-enum-is-not-cls-compliant.md BC40032: Underlying type <typename> of Enum is not CLS-compliant
docs/visual-basic/programming-guide/concepts/reflection.md docs/visual-basic/programming-guide/concepts/reflection

@gewarren gewarren marked this pull request as ready for review January 13, 2026 03:59
@gewarren gewarren requested review from a team, BillWagner and adegeo as code owners January 13, 2026 03:59
Copilot AI review requested due to automatic review settings January 13, 2026 03:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates Reflection.Emit documentation to clarify .NET Framework vs. modern .NET support. The main changes rename reflection.md to overview.md and add important notices to reflection emit how-to articles indicating they show .NET Framework-specific APIs not available in modern .NET.

Changes:

  • Renamed docs/fundamentals/reflection/reflection.md to overview.md with redirect configuration
  • Added important notices to reflection emit how-to articles clarifying .NET Framework-only support
  • Updated cross-references throughout documentation from reflection.md to overview.md
  • Added new C# code snippets for generic type instantiation and updated existing reflection emit samples
  • Modernized code syntax (collection expressions, target-typed new, improved formatting)
  • Updated table formatting in dynamically-loading-and-using-types.md

Reviewed changes

Copilot reviewed 24 out of 29 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/fundamentals/reflection/overview.md Renamed from reflection.md (frontmatter cleanup)
docs/fundamentals/reflection/how-to-define-a-generic-type-with-reflection-emit.md Added .NET Framework-only notice, updated title, and modernized content structure
docs/fundamentals/reflection/how-to-define-a-generic-method-with-reflection-emit.md Added .NET Framework-only notice and updated title
docs/fundamentals/reflection/how-to-examine-and-instantiate-generic-types-with-reflection.md Updated code snippet references to new directory structure
docs/fundamentals/reflection/snippets/csharp/instantiate-generic-type/* New code samples demonstrating generic type instantiation
docs/fundamentals/reflection/snippets/csharp/emit-generic-type/* Modernized existing code with new C# syntax features
docs/fundamentals/reflection/snippets/csharp/construct-generic-method/* New complete code sample for generic method construction
docs/fundamentals/runtime-libraries/system-reflection-emit-persistedassemblybuilder.md Minor wording improvements for clarity
docs/fundamentals/reflection/dynamically-loading-and-using-types.md Improved table formatting with code formatting for type names
Multiple cross-reference files Updated links from reflection.md to overview.md
.openpublishing.redirection.fundamentals.json Added redirect rule for renamed file

Copy link
Copy Markdown
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, but we should point out the use of an unsupported scenario.

Comment thread docs/fundamentals/reflection/snippets/csharp/emit-generic-type/Project.csproj Outdated
@gewarren gewarren merged commit bc29023 into dotnet:main Jan 15, 2026
9 checks passed
@gewarren gewarren deleted the reflection-emit branch January 15, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UUF] AssemblyBuilderAccess.RunAndSave doesn't exist

3 participants