How release file loaded with Assembly.LoadFrom() ?

  • Thread starter Thread starter Tomas Palmquist
  • Start date Start date
T

Tomas Palmquist

I have loaded a file from disk with the Assembly.LoadFrom() method.
What do I have to do so the file can be released and the file deleted ?

Regards

Tomas Palmquist
Pointsec Mobile Technologies
 
Tomas,
What do I have to do so the file can be released and the file deleted ?

Unload the AppDomain it's loaded into.

But you can avoid the file lock by enabling shadow copying. Or you may
be able to load the file into a byte array and use
Assembly.Load(byte[]) instead.



Mattias
 
Back
Top