RegAsm.exe Assembly Registration Utility


RegAsm assembly [options]


Registers an assembly in the system registry. This allows COM clients to call managed methods. You can also use it to generate the registry file for future registration. If the assembly is only accessed from one COM client, and that client lives in the same directory as the assembly, you do not need to add the assembly to the GAC. If you want the assembly to be accessible to all COM clients, you should add it to the GAC (see GacUtil.exe).


regasm /regfile:c.reg c.dll


/?, /help

Displays usage information and exits.


Specifies a file path for the assembly. Do not use this if the assembly is in the GAC, or if you later plan to add it to the GAC. The assembly must be signed with a strong name (see Sn.exe).


Suppresses display of the banner and copyright messages.

/regfile[ :file]

Generates a .reg file that you can use to add the assembly to the registry. This option does not change the registry; you need to double-click on the generated .reg file to add the assembly to the registry. You cannot use this option with /unregister or /tlb.


Refers only to type libraries that are already registered.


Suppresses display of success messages.

/tlb[ :file]

Generates a type library (.tlb).


Unregisters the assembly.


Displays verbose output.

See Also

GacUtil.exe, Sn.exe

    Part II: Programming with the .NET Framework
    Part IV: API Quick Reference