How to unload an assembly?
-
What have you tried doing?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
What have you tried doing?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
I am creating a dll at run time. When i need to refer that dll i have to laod the assembly and get the reference. Till here its working fine but now if i recompile this assembly to modify it message comes that this assembly can't be loaded as it is in progress.So before recompiling i have to unload that assembly.
-
I am creating a dll at run time. When i need to refer that dll i have to laod the assembly and get the reference. Till here its working fine but now if i recompile this assembly to modify it message comes that this assembly can't be loaded as it is in progress.So before recompiling i have to unload that assembly.
You can't unload assemblies. You can unload application domain which hosts these assemblies. So all the assemblies will get unloaded. BTW, what this has to do with ASP.NET ?
-
I am creating a dll at run time. When i need to refer that dll i have to laod the assembly and get the reference. Till here its working fine but now if i recompile this assembly to modify it message comes that this assembly can't be loaded as it is in progress.So before recompiling i have to unload that assembly.
in the Page_Unload Event, make the object to null it will be nullified and no problem will be in future compiling
-
You can't unload assemblies. You can unload application domain which hosts these assemblies. So all the assemblies will get unloaded. BTW, what this has to do with ASP.NET ?
I have to dynamically load and unload assemblies in .net website so that the assembly can be modified at runtime and recompiled.Assemblies can not be unloaded but how using appdomain i can unload an assembly.I am compiling my assembly at one page and using it by loading the assemble in different page.
-
in the Page_Unload Event, make the object to null it will be nullified and no problem will be in future compiling
This is the object of the class i am making.This object is used to get the methods of the assembly using reflection.Can u pls tell me which object i will make null? Dim asm As [Assembly] = [Assembly].LoadFile(System.Web.HttpRuntime.AppDomainAppPath & "Bin\Mytext.dll") Dim objAssembly As System.Reflection.Assembly = asm Dim objTheClass As Object = objAssembly.CreateInstance("DynamicClass")
-
This is the object of the class i am making.This object is used to get the methods of the assembly using reflection.Can u pls tell me which object i will make null? Dim asm As [Assembly] = [Assembly].LoadFile(System.Web.HttpRuntime.AppDomainAppPath & "Bin\Mytext.dll") Dim objAssembly As System.Reflection.Assembly = asm Dim objTheClass As Object = objAssembly.CreateInstance("DynamicClass")
objAssembly Make it null in the page unload event