I see that . ..
Hi,
I see that post
But he dont help me much
The problem is that when a appDomain, part off main AppDomain, loads a dll the main AppDomain loads the dll too
Look this
------------------------------ cut here ----------------------------------
Public Sub Load(ByVal libraryName As String)
Try
Dim cont As Long
Dim controleDomainApp As AppDomain
If Dir(System.Environment.CurrentDirectory & "\" & libraryName) <> "" Then
For cont = 1 To colecaoNomesDLL.Count
If colecaoNomesDLL(cont) = libraryName Then
Exit Sub
End If
Next
colecaoNomesDLL.Add(libraryName)
Dim setup As AppDomainSetup = New AppDomainSetup()
setup.ApplicationBase = System.Environment.CurrentDirectory
setup.PrivateBinPath = AppDomain.CurrentDomain.BaseDirectory
setup.ShadowCopyFiles = "false"
setup.ShadowCopyDirectories = libraryName
controleDomainApp = AppDomain.CreateDomain(libraryName, Nothing, setup)
controleDomainApp.Load(System.Reflection.AssemblyName.GetAssemblyName(libraryName))
colecaoAppDomain.Add(controleDomainApp)
End If
Catch err As Exception
tratadorErro.trataErro(err)
End Try
End Sub
------------------------------ cut here ----------------------------------
When the appDomain created loads the dll the main appDomain loads the dll too. I dont need this. I like that main appDomain uses the dll loaded by the appDomain created
Any sugestion ?!?!?