This project is read-only.

Answer disappeared from FAQ: How do I compile some code into a collectible type or DynamicMethod

Topics: General
Jun 26, 2014 at 9:32 AM

There is one very interesting question in the FAQ whose answer is actually gone! (although the question is still there).
"How do I compile some code into a collectible type or DynamicMethod?"

I would very much appreciate to get an answer on that question.

Thanks a lot,
Jun 29, 2014 at 7:34 AM
We don't support emitting to collectible assemblies anymore.

I assume you'd like to emit code that is collected after you stop using it. Could you describe the scenario you'd like to use such a feature for?
Jun 30, 2014 at 9:00 AM
Hi Tomas,

The scenario is a to build a kind of REPL loop on top of our application so that end user has powerful customization capabilities. In some scenarios, the application works 24/7 and the user communicates expressions via files. Hence we need the collection of emitted code.

Jul 1, 2014 at 6:32 AM
Thanks for the details.

We have removed the support for collectible assemblies since the underlying implementation in the CLR doesn't provide us the capabilities we need to build a fully functional C#/VB code gen on top of it. The implementation we had was mostly experimental with a lot of workarounds and problems. We are reluctant to ship something that only works in limited scenarios and not really well either.

May I suggest opening a feature request on asking for a comprehensive solution for emitting collectible code on the CLR? Please include a brief description of your 24/7 app scenario. It will help us prioritize this feature request appropriately.

Thanks for your feedback!
Jul 1, 2014 at 12:09 PM