I have a MS Visual Studio 7 .NET Class Library project whcih produces a dll (MyDLL.dll), I would then like to import the type library from it in Visual Studio 6 using a #import "MyDLL.dll". I really want to avoid the intermediate step of using tlbexp.exe as it is not available to us on a remote build machine.

Is this possible

Re: .NET Base Class Library Type Libraries


Is you MyDll.dll managed

Ok What you can do is do a tlbexp on the machine where you have VS.NET 7, and distribute it along with the solution..(add it as solution Item).

Re: .NET Base Class Library Type Libraries


Managed assemblies do not contain a type library and do not have the required entrypoints to register themselves as a COM component. You must use Tlbexp.exe to convert the metadata into a type library and use Regasm.exe to create the registry entries so they can be used as a COM component in other apps. You can simply copy Tlbexp.exe to the build machine, it only requires the framework to be installed.