Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to unload an assembly?

How to unload an assembly?

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amit jha
    wrote on last edited by
    #1

    How to load an assembly using wrapper class and unload it?

    P 1 Reply Last reply
    0
    • A amit jha

      How to load an assembly using wrapper class and unload it?

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      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

      A 1 Reply Last reply
      0
      • P Paul Conrad

        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

        A Offline
        A Offline
        amit jha
        wrote on last edited by
        #3

        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.

        C S 2 Replies Last reply
        0
        • A amit jha

          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.

          C Offline
          C Offline
          Christian Flutcher
          wrote on last edited by
          #4

          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 ?

          A 1 Reply Last reply
          0
          • A amit jha

            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.

            S Offline
            S Offline
            satyaanand andra gmail com
            wrote on last edited by
            #5

            in the Page_Unload Event, make the object to null it will be nullified and no problem will be in future compiling

            A 1 Reply Last reply
            0
            • C Christian Flutcher

              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 ?

              A Offline
              A Offline
              amit jha
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • S satyaanand andra gmail com

                in the Page_Unload Event, make the object to null it will be nullified and no problem will be in future compiling

                A Offline
                A Offline
                amit jha
                wrote on last edited by
                #7

                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")

                S 1 Reply Last reply
                0
                • A amit jha

                  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")

                  S Offline
                  S Offline
                  satyaanand andra gmail com
                  wrote on last edited by
                  #8

                  objAssembly Make it null in the page unload event

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups