Skip to content

Can these Reflection / Reflection.Emit bugfixes be backported from .NET Core to .NET Framework? #771

Description

@stakx

I've recently submitted several bugfixes for Reflection and Reflection.Emit which I would love to see backported to the .NET Framework. The goal is to increase the accuracy of dynamic proxying of types (with e.g. DynamicProxy) which would directly benefit mocking libraries (e.g. Moq, NSubstitute, FakeItEasy) and DI containers (e.g. Castle Windsor, Autofac).

I suspect that there is significant code share between the CLR and the CoreCLR in the Reflection facilities, since both runtimes had the same bugs, so backporting would seem generally feasible.

Could the following changes from CoreCLR please be backported to the .NET Framework?:

Reflection: Fix FormatException when querying ParameterInfo.DefaultValue of optional DateTime parameter

Reflection.Emit: Allow ParameterBuilder.SetConstant(null) for value-typed parameters

Reflection: Fix FormatException when querying ParameterInfo.DefaultValue of optional (closed generic) enum parameter

Reflection: Allow ParameterBuilder.SetConstant(nonNullValue) for nullable enum parameters

If I am asking in the wrong place, please let me know how to proceed in order to advance this request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions