Welcome to MSDN Blogs Sign in | Join | Help

Enc APIs aren't exposed through reflection

David  Srbecky asked:

Can a EnC capable compiler work on top of System.Refletion.Emit? (ie. If an existing compiler is to be extended to support EnC, does it have to be rewritten to use the unmanaged emitting interface?)

Unfortuantely, No. Details:
1. You can indeed write a compiler in C# which emits using reflection-emit (here's a sample for v1.1).
2. However, the Edit-and-Continue functionality in the unmanaged metadata APIs is not exposed via Reflection-emit. You could create your own metadata wrappers that expose this functionality, but there are dangers directly using the metadata APIs from managed code.
3. On a related note, you can't use EnC to edit Dynamic code (code generated by ref-emit).

 

Published Monday, May 08, 2006 1:52 PM by jmstall

Comments

# re: Enc APIs aren't exposed through reflection

Monday, May 08, 2006 3:11 PM by David Srbecky
Thank you very much for your quick reply!

# Interesting Finds

Tuesday, May 09, 2006 3:13 PM by Jason Haley
New Comments to this post are disabled
 
Page view tracker