When launching
dscom tlbexport my.dll --asmpath D:\mypath
I found an unhandled exception with Visual Visual Studio:
Exception thrown at 0x00007FFB7531831A in dscom.exe: Microsoft C++ exception: HRMsgException at memory location 0x00000000001C7380.
at the function LoadFromAssemblyPath(dllToLoad)
|
return LoadFromAssemblyPath(dllToLoad); |
and the issue is that not all types are loaded.
By replacing LoadFromAssemblyPath() with
Assembly.LoadFile(dllToLoad)
the assembly and all dependencies are correctly loaded.
Additional details:
my.dll is defining a COM interface and a class derived from MyLib.MyClass that is a class in another assembly that actually implement the interface
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("AA3C9EF2-AAAA-424B-8A96-35910B102956")]
public interface ISum
{
int Sum(int a, int b);
}
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[Guid("AAAB3576-AAAA-4652-A87A-3579DD85AF69")]
public class ComSum : MyLib.MyClass, ISum
{
}
When launching
dscom tlbexport my.dll --asmpath D:\mypathI found an unhandled exception with Visual Visual Studio:
Exception thrown at 0x00007FFB7531831A in dscom.exe: Microsoft C++ exception: HRMsgException at memory location 0x00000000001C7380.at the function LoadFromAssemblyPath(dllToLoad)
dscom/src/dscom.client/AssemblyResolver.cs
Line 48 in 14dad8d
and the issue is that not all types are loaded.
By replacing LoadFromAssemblyPath() with
Assembly.LoadFile(dllToLoad)the assembly and all dependencies are correctly loaded.
Additional details:
my.dll is defining a COM interface and a class derived from MyLib.MyClass that is a class in another assembly that actually implement the interface