Hown to unload an assembly loaded via LoadFrom?

E

Edward Yang

I have a piece of code that loads an assembly (an .exe file) using LoadFrom.
I check the GuiAttribute value and then get a updated version from a
configured URL and try to replace the assembly.

The problem is that Assembly class does not have an Unload method so that
once an assembly is loaded, it is not able to be unloaded manually. I most
of the time got the error that the assembly (.exe) is used by another
process and I could not repalce it with the new version.

I hope anybody can tell me a work-around way to unload a loaded assembly
from memory using code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top