Can I reload the assembly in Mono CSharpRepl?

So, I'm starting out from the Python background and starting to get into C # and Mono on my Mac. I recently found the Mono CSharpRepl tool and would like to use it to achieve a similar workflow that I have in Python that involves reusing 'reload (module) "as I am fixing bugs in my Python code. Does Mono have CSharpRepl similar functionality? Currently, I just walked away, restarted, and then again called "LoadAssembly ()" and "using" statements, which is a pain.

+4
source share
2 answers
$ csharp Mono C# Shell, type "help;" for help Enter statements below. csharp> var dom = AppDomain.CreateDomain("tmp"); csharp> dom.Load("System.Core"); System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 csharp> AppDomain.Unload(dom); csharp> 

It will do what you want, I suppose

+5
source

Iโ€™m afraid it might be difficult, .NET does not have the ability to unload the assembly, except to drop the entire AppDomain, which probably will not be easier than restarting CSharpRepl.

+1
source

Source: https://habr.com/ru/post/1347137/


All Articles