Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / August 2004

Tip: Looking for answers? Try searching our database.

Unload assembly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Xavi Sam - 27 Aug 2004 07:42 GMT
Hi

I know how to load a assembly form specified directory, using
Assembly.LoadFrom but How can I unload it? Is there something similar to
FreeLibrary?

Thanks in advance

Javier
Stefano \ - 27 Aug 2004 07:51 GMT
> I know how to load a assembly form specified directory, using
> Assembly.LoadFrom but How can I unload it? Is there something similar to
> FreeLibrary?

As far as I know, you cannot unload an assembly. The recommended way is to
load you dynamic assemblies in a separate appdomain, and tear down the whole
appdomain when you need to unload the assemblies.
Signature

 WildHeart'2k4

Shiva - 27 Aug 2004 08:02 GMT
Hi,
Assemblies cannot be unloaded. You have to load them in a separate app
domain and unload that app domain when assemblies have to be unloaded.

Hi

I know how to load a assembly form specified directory, using
Assembly.LoadFrom but How can I unload it? Is there something similar to
FreeLibrary?

Thanks in advance

Javier
ESCOFFIER Clément - 27 Aug 2004 09:52 GMT
A solution not sure to unload an assembly is to create a second
appdomain who list the loaded assemblies. When you want to unload an
assembly, you remove this assembly of the list ( stored in the second
appdomain ), then you delete the first appdomain, and you create the
first appdomain with all assemblies listed.  This solution is dangerous
when you have links between assemblies, and you lost your execution
context. But it is the only solution, to unload One assembly.

Clément

> Hi,
> Assemblies cannot be unloaded. You have to load them in a separate app
[quoted text clipped - 9 lines]
>
> Javier

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.