[导入]What is the equivalent to regsvr32 in .NET?

Where you once used Regsvr32 on unmanaged COM libraries, you will now use Regasm on managed .NET libraries.

Regsvr32 is the command-line tool that registers .dll files as command components in the registry“

“Regasm.exe, the Assembly Registration tool that comes with the .NET SDK,  reads the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently. Once a class is registered, any COM client can use it as though the class were a COM class. The class is registered only once, when the assembly is installed. Instances of classes within the assembly cannot be created from COM until they are actually registered.“

If you want to register an assembly programmatically, see the RegistrationServices class and ComRegisterFunctionAttribute

 

文章来源: http://blogs.msdn.com/csharpfaq/archive/2004/08/02/206158.aspx

你可能感兴趣的:(.net)