When you import an assembly from disk it (and it's linked assemblies) are kept open, thus preventing the user from moving / deleting the original assembly.
I found this bug while developing the the initial release of the plugin and wasn't able to fix it. There is a workaround: Just close NClass and all imported assemblies get closed.
Technical background: If an assembly is opened for reflection, all code is loaded into the current application domain and there is no way to unload it again. So it should be loaded into an extra application domain and be reflected there. After that, the second application domain should be unloaded/closed which would close all opened files. But I couldn't get that working.
So this bug still remains on my todo list.
This is fixed with the new AssemblyImporter-Plugin using NReflect
Log in to post a comment.