How do I unload a dll loaded via 'clr.AddReference' in a Python Script?


I am busy developing some dll files in C# which I load and run with a Python script node.


from NameSpace import Class

class_instance = Class()

During debugging I constantly test and update. When I recompile the updated library, it successfully loads, but Dynamo (or Python) still has the previous library in memory and no changes made come through. E.g. in my updated class I defined a new method called ‘DoSomethingElse’, but I get the error that DoSomethingElse is not defined.

from NameSpace import Class

class_instance = Class()

How can I flush that previous version out of memory without having to completely close Revit as this is the only option I know of and it becomes very tedious?