How to: Wrap Multiple Versions of Type Libraries
Optionally, you can wrap more than one version of a type library. For example, you can indicate that a primary interop assembly supports type library versions 1.0 and 1.1.
To wrap multiple versions of a type library
Import a type library file:
tlbimp LibUtil.tlb /primary /keyfile:CompanyA.snk /out:LibUtil.dll
Create a text file from the imported assembly by using the MSIL Disassembler (Ildasm.exe):
ildasm LibUtil.dll /out:LibUtil.il
Using a text editor, insert a second PrimaryInteropAssemblyAttribute attribute below the attribute added by Tlbimp.exe. Include the major and minor version numbers that represent the second type library version.
Generate and sign a new assembly from the modified text file by using the MSIL Assembler (Ilasm.exe):
ilasm LibUtil.il /dll /key:CompanyA.snk
See Also
Tasks
How to: Generate Primary Interop Assemblies Using Tlbimp.exe
Concepts
Generating Primary Interop Assemblies
Producing Primary Interop Assemblies