Is it possible to reload the CLR?

346 views Asked by At

I'm fiddling with a project where the CLR is hosted within a C application. Is there a supported way to unlink the CLR and relaunch it?

2

There are 2 answers

1
Christian.K On BEST ANSWER

I don't have the book before my right now, but I believe (accroding to Customization the Common Language Runtime) it is not possible to do that. You can unload, i.e. "disable" it, but then you cannot reload it in the same process instance.

0
Reed Copsey On

Instead of trying to reload the CLR, you could load and host all of your information in an AppDomain you create.

You could then manage the life of the AppDomain, including unloading the entire AppDomain and loading a new one.

This will provide most of the benefits that reloading the CLR would provide, without actually trying to unload the CLR.