Remove Lock on (assembly) File
-
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
-
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