Using AppDomain to load an assembly

C

Chris Dunaway

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.
 
C

Chris Dunaway

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/default.asp?url=/library/en-us/dnaspp/html/searchforplugins.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.
 

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