When I use the Assembly.LoadFile method, I have no outside access to the file that was loaded into assembly until my program is closed. A StreamReader, on the other hand, allows me to close the stream when I am finished using it using the StreamReader.Close() method.
Is there some way I can do the same thing when using Assembly.Load?
Thank you,
Evan
No, that’s by design.
If you want to ‘UnLoad’ an assembly you have to load it into a separate AppDomain.
If you just want to release the file you could load it into
byte[]first and use the (deprecated)Assembly.Load(byte[] rawAssemly)method.