C# FAQ: Is there a .NET equivalent to regsvr32

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:FAQs
edit

Is there a .NET equivalent to regsvr32?

Whereas Regsvr32 is used on unmanaged COM libraries, Regasm is used on managed .NET libraries.

Regsvr32 is a command-line tool for registering .dll files as command components in the Windows registry.

Regasm—the assembly registration tool provided with the .NET System Development Kit (SDK)—reads assembly metadata and adds necessary entries to the Windows registry, thus allowing COM clients to create .NET Framework classes transparently. After a class has been registered, any COM client can use it as though the class were a COM class. The class will be registered only once when the assembly is installed. Instances of assembly classes cannot be created from COM until they are registered.

There are two related utilities with functions similar to those of Regasm. Gacutil can be used when there are no COM exports. Installutil can be used for a Windows service.

To programmatically register an assembly, refer to the RegistrationServices class and ComRegisterFunctionAttribute.



Personal tools