By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,557 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,557 IT Pros & Developers. It's quick & easy.

Using AppDomain to load an assembly

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
"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.