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. General Programming
  3. .NET (Core and Framework)
  4. Remove Lock on (assembly) File

Remove Lock on (assembly) File

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharp
2 Posts 2 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.
  • P Offline
    P Offline
    Paul Farry
    wrote on last edited by
    #1

    I have a sub in my VB.Net that is loading a plugin into my Host Application. I have a method in the system that allows a specific plugin to be unloaded. But I cannot get the assembly to allow me to delete/replace the DLL in the system. I've extracted this out to as simple as I can. Am I missing something in this code that would allow me to do it. Imports System.Reflection Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim objDLL As [Assembly] objDLL = [Assembly].LoadFrom("Z:\broker\plugins\EODStoretoXML.dll") objDLL = Nothing System.GC.Collect() System.GC.WaitForPendingFinalizers() System.GC.Collect() end Sub

    C 1 Reply Last reply
    0
    • P Paul Farry

      I have a sub in my VB.Net that is loading a plugin into my Host Application. I have a method in the system that allows a specific plugin to be unloaded. But I cannot get the assembly to allow me to delete/replace the DLL in the system. I've extracted this out to as simple as I can. Am I missing something in this code that would allow me to do it. Imports System.Reflection Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim objDLL As [Assembly] objDLL = [Assembly].LoadFrom("Z:\broker\plugins\EODStoretoXML.dll") objDLL = Nothing System.GC.Collect() System.GC.WaitForPendingFinalizers() System.GC.Collect() end Sub

      C Offline
      C Offline
      clon
      wrote on last edited by
      #2

      If you need unload assembly, load it in an another domain and then unload domain. No way for unloading only assembly :( P.S. sorry for the my dirty English

      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