-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Reflection.Emit.DynamicILInfo #18703
Comments
@weshaggard @danmosemsft can you provide details here? |
We aren't planning to add Reflection.Emit to .NET Core at this time. |
@danmosemsft But there is others Reflection.Emit types that exist. DynamicMethod for example exist in System.Reflection.Emit.Lightweight assembly. |
There is some basic support for Reflection.Emit in .NET Core today. We don't currently have plans to add any further support at this point, that may change in the future. I don't know enough about the space to provide information about DynamicILInfo, but perhaps @jkotas can help suggest some other possible ways to handle that. |
What are you using DynamicILInfo for? |
@jkotas I'm using it for set the byte array code of a DynamicMethod (I need to convert method to DynamicMethod). As an aside, why DynamicMethod and emit opcodes are included and DynamicILInfo not? Is it not just more form the same capabilities? There is something special that it can't be included? BTW @terrajobst wrote in this post:
I wonder if its including DynamicILInfo also. |
There is no reasonable way in the currently available .NET Core RefEmit APIs to just set the IL for the method if you have it available. I agree that it would make sense to add DynamicILInfo. It is the core building block for power users - ILGenerator and friends are a convenience layer above it. |
Next step: Design it and implement it. Potentially leverage Desktop code (it is also on ReferenceSource). |
This code is in CoreCLR (https://github.com/dotnet/coreclr/blob/68f72dd2587c3365a9fe74d1991f93612c3bc62a/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs#L925). It needs to be flipped back to public, exposed in contracts, and tests added. |
Even better, marking as "up for grabs". Anyone interested? |
In addition, the code in coreclr is missing a bunch of its members... those will need to be ported back from netfx as well, though it shouldn't be much more than copy/paste. |
Closed by dotnet/corefx#34532 |
I rely in my code on this type. Is it planned to include it? Currently in .NET API Catalog it's not seem to exist in .NET Standard or .NET Core App.
Search for this in this repository does not give any hint.
The text was updated successfully, but these errors were encountered: