Skip to content

Should there be a .Net Standard 2.0 version of Reflection.Emit? #26007

@svick

Description

@svick

System.Reflection.Emit is not part of .Net Standard, but there are packages that let you use it from a .Net Standard library (specifically, System.Reflection.Emit and System.Reflection.Emit.Lightweight). But those packages do not have a .Net Standard 2.0 version, only .Net Standard 1.x versions.

This has some implications:

  • .Net Standard 2.0 libraries can't use typeBuilder.CreateType() (even though this code works both on .Net Framework 4.6.1 and .Net Core 2.0) and have to use typeBuilder.CreateTypeInfo().AsType() instead. It's possible there are also other APIs like this.
  • .Net Standard 2.0 libraries that want to use Reflection.Emit still have to use .Net Standard 1.x-style System.* packages.

These issues would be solved if a .Net Standard 2.0 version was added to Reflection.Emit packages. Is that something that would be worth doing?

Though both of these are fairly small quibbles, so I'm not sure how much value would doing this add.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Reflection.EmitquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions