468,296 Members | 1,266 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Using AppDomain to load an assembly

I am using reflection to load an assembly dynamically at runtime. If there
are classes in the assembly that implement a particular interface, I put an
entry in a list for later use.

My questions concerns the loading of the assembly. Since there is no way
to unload the assembly, what happens if a assembly I have loaded does not
contain any classes that implement my interface? Does the assembly just
hang around until the app ends? Does it really matter?

I wish to avoid this if possible and I read that to be able to unload an
assembly, you have to use an AppDomain. I have been unable to find a
clear, simple example that shows this.

Can anyone help?

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #1
2 1317
On Fri, 1 Oct 2004 10:17:22 -0500, Chris Dunaway wrote:
I am using reflection to load an assembly dynamically at runtime. If there
are classes in the assembly that implement a particular interface, I put an
entry in a list for later use.

My questions concerns the loading of the assembly. Since there is no way
to unload the assembly, what happens if a assembly I have loaded does not
contain any classes that implement my interface? Does the assembly just
hang around until the app ends? Does it really matter?

I wish to avoid this if possible and I read that to be able to unload an
assembly, you have to use an AppDomain. I have been unable to find a
clear, simple example that shows this.

Can anyone help?


Wouldn't you know it, as soon as I post a request, I find an answer. Here
it is for others with this question:

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

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #2
"Chris Dunaway" <"dunawayc[[at]_lunchmeat_sbcglobal[dot]]net"> schrieb:
[Unloading assemblies]
I wish to avoid this if possible and I read that to be able to unload an
assembly, you have to use an AppDomain. I have been unable to find a
clear, simple example that shows this.


Do you speak C#?

<URL:http://www.codeproject.com/csharp/livecodedotnet.asp>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mirano | last post: by
2 posts views Thread by Lauren Hines | last post: by
8 posts views Thread by A. Elamiri | last post: by
6 posts views Thread by Wal Turner | last post: by
3 posts views Thread by Frank Uray | last post: by
2 posts views Thread by Tim | last post: by
2 posts views Thread by =?Utf-8?B?UGFi?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.