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 / New Users / May 2004

Tip: Looking for answers? Try searching our database.

How to unload an assembly that is loaded with Assembly.LoadForm

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lloyd Sheen - 30 Apr 2004 01:01 GMT
I am having trouble gettting an assembly loaded with Assembly.LoadFrom.

I can get the assembly call the method I need to call.  Now I want to unload
the assembly.  I need to do this so that the user can (thru my app) create a
new version of the assembly.  The app will call a predetermined method (sort
of an add-in) and then exit.  At this point if the output is not what the
user wants , the GUI will allow the user to edit the source code that
created the assembly and recompile it.  Not being able to unload means that
the compile will fail as it attempts to create the DLL.

I have tried creating an AppDomain, adding the assembly and then after
calling the method using the appdomain.unload.  This does not free up the
dll.

Any ideas??

Lloyd Sheen
Dmitriy Krasnikov - 11 May 2004 16:16 GMT
>I am having trouble gettting an assembly loaded with Assembly.LoadFrom.
>
[quoted text clipped - 13 lines]
>
>Lloyd Sheen

Don't use LoadFrom use Load. Read the file to byte[], close stream and
load byte[]. Then you can delete the file or overwrite it.

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.