I create a .net dll on the fly with codedom then I load it with Assembly.LoadFrom like this:
Private Sub Test()
Dim ASM As Assembly = Assembly.LoadFrom("test.dll")
'Do some stuff with the loa开发者_Go百科ded assembly...
End Sub
it works only once. If I try to recompile the test.dll i get the error that the file is used and not writable. I tried to set ASM to nothing - how can I unload the loaded Assembly from the memory?
Loaded assemblies can only be unloaded by destroying the AppDomain in which they are loaded. Review the How To article links on this MSDN Library page.
精彩评论