Option | Description |
|---|
/asmversion:versionNumber | Specifies the version number of the assembly to produce. Specify versionNumber in the format major.minor.build.revision. |
/delaysign | Specifies to Tlbimp.exe to sign the resulting assembly with a strong name using delayed signing. You must specify this option with either the /keycontainer:, /keyfile:, or /publickey: option. For more information on the delayed signing process, see Delay Signing an Assembly. |
/help | Displays command syntax and options for the tool. |
/keycontainer:containername | Signs the resulting assembly with a strong name using the public/private key pair found in the key container specified by containername. |
/keyfile:filename | Signs the resulting assembly with a strong name using the publisher's official public/private key pair found in filename. |
/namespace:namespace | Specifies the namespace in which to produce the assembly. |
/noclassmembers | Prevents Tlbimp.exe from adding members to classes. This avoids a potential TypeLoadException. |
/nologo | Suppresses the Microsoft startup banner display. |
/out:filename | Specifies the name of the output file, assembly, and namespace in which to write the metadata definitions. The /out option has no effect on the assembly's namespace if the type library specifies the Interface Definition Language (IDL) custom attribute that explicitly controls the assembly's namespace. If you do not specify this option, Tlbimp.exe writes the metadata to a file with the same name as the actual type library defined within the input file and assigns it a .dll extension. If the output file is the same name as the input file, the tool generates an error to prevent overwriting the type library. |
/primary | Produces a primary interop assembly for the specified type library. Information is added to the assembly indicating that the publisher of the type library produced the assembly. By specifying a primary interop assembly, you differentiate a publisher's assembly from any other assemblies that are created from the type library using Tlbimp.exe. You should only use the /primary option if you are the publisher of the type library that you are importing with Tlbimp.exe. Note that you must sign a primary interop assembly with a strong name. For more information, see Primary Interop Assemblies. |
/publickey:filename | Specifies the file containing the public key to use to sign the resulting assembly. If you specify the /keyfile: or /keycontainer: option instead of /publickey:, Tlbimp.exe generates the public key from the public/private key pair supplied with /keyfile: or /keycontainer:. The /publickey: option supports test key and delay signing scenarios. The file is in the format generated by Sn.exe. For more information, see the -p option of Sn.exe in Strong Name Tool (Sn.exe). |
/reference:filename | Specifies the assembly file to use to resolve references to types defined outside the current type library. If you do not specify the /reference option, Tlbimp.exe automatically recursively imports any external type library that the type library being imported references. If you specify the /reference option, the tool attempts to resolve external types in the referenced assemblies before it imports other type libraries. |
/silent | Suppresses the display of success messages. |
/strictref | Does not import a type library if the tool cannot resolve all references within the current assembly, the assemblies specified with the /reference option, or registered primary interop assemblies (PIAs). |
/strictref:nopia | Same as /strictref, but ignores PIAs. |
/sysarray | Specifies to the tool to import a COM style SafeArray as a managed System.Array Class type. |
/tlbreference:filename | Specifies the type library file to use to resolve type library references without consulting the registry. Note that this option will not load some older type library formats. However, you can still load older type library formats implicitly through the registry or current directory. |
/transform:transformName | Transforms metadata as specified by the transformName parameter. Specify dispret for the transformName parameter to transform [out, retval] parameters of methods on dispatch-only interfaces (dispinterfaces) into return values. For more information about this option, see the examples later in this topic. |
/unsafe | Produces interfaces without .NET Framework security checks. Calling a method that is exposed in this way might pose a security risk. You should not use this option unless you are aware of the risks of exposing such code. |
/verbose | Specifies verbose mode; displays additional information about the imported type library. |
/? | Displays command syntax and options for the tool. |