469,889 Members | 1,274 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

Unloading Assemblies

Hello,

I would like to unload an assembly after I finished my stuff.

I tried to load the assembly in to an AppDomain like this:

AssemblyName asmName = AssemblyName.GetAssemblyName(fullFileName);

Assembly asm = helpAppDomain.Load(asmName);

In this case I get an SerializationException and after some reading I
discovered that the .Load function only works on the
AppDomain.CurrentDomain...

Does anyone know if I can load/unload Assembly Dll's using Appdomain, or is
there another way to explicitely unload an assembly?

Greets,

Arthur
Nov 15 '05 #1
2 1679
100
Hi Arthur,
Once you load an assembly you cannot unload it. You can only unload
application domains only. Unloading appdomain will unload all assemblies
loaded on it.

HTH
B\rgds
100

"Arthur Roodenburg" <@> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
Hello,

I would like to unload an assembly after I finished my stuff.

I tried to load the assembly in to an AppDomain like this:

AssemblyName asmName = AssemblyName.GetAssemblyName(fullFileName);

Assembly asm = helpAppDomain.Load(asmName);

In this case I get an SerializationException and after some reading I
discovered that the .Load function only works on the
AppDomain.CurrentDomain...

Does anyone know if I can load/unload Assembly Dll's using Appdomain, or is there another way to explicitely unload an assembly?

Greets,

Arthur

Nov 15 '05 #2
I wrote this column a while back.

http://msdn.microsoft.com/library/de...rp05162002.asp

--
Eric Gunnerson

Visit the C# product team at http://www.csharp.net
Eric's blog is at http://blogs.gotdotnet.com/ericgu/

This posting is provided "AS IS" with no warranties, and confers no rights.
"Arthur Roodenburg" <@> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
Hello,

I would like to unload an assembly after I finished my stuff.

I tried to load the assembly in to an AppDomain like this:

AssemblyName asmName = AssemblyName.GetAssemblyName(fullFileName);

Assembly asm = helpAppDomain.Load(asmName);

In this case I get an SerializationException and after some reading I
discovered that the .Load function only works on the
AppDomain.CurrentDomain...

Does anyone know if I can load/unload Assembly Dll's using Appdomain, or is there another way to explicitely unload an assembly?

Greets,

Arthur

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by LilleSkutt | last post: by
9 posts views Thread by Rom Marshall | last post: by
5 posts views Thread by vineeth | last post: by
2 posts views Thread by Guru Prasad | last post: by
5 posts views Thread by Bob | last post: by
reply views Thread by Christian Wulff | last post: by
reply views Thread by ibenc | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.