My problem:
Given the list of DLL paths, find their version number and any links collected. Some may point to the same DLL, but with a different path or version.
My code is:
Dim otherDomain As AppDomain = AppDomain.CreateDomain("otherDomain") otherDomain.DoCallBack(Sub() Assembly.ReflectionOnlyLoadFrom("filePath") End Sub) Dim assemblies As New List(Of Assembly)(otherDomain.ReflectionOnlyGetAssemblies())
The last line throws:
Failed to load file or assembly 'file', Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null or one of its dependencies. The system cannot find the specified file.
If this line worked, I suppose I just go:
assemblies(0).GetName.version.tostring assemblies(0).GetReferencedAssemblies
and then unload the Application Domain .
source share