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

博客提到在非托管COM库中曾用Regsvr32,现在在托管.NET库中用Regasm。还指出Regsvr32是将.dll文件作为命令组件在注册表中注册的命令行工具,若要以编程方式注册程序集,可参考RegistrationServices类和ComRegisterFunctionAttribute。

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

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

转载于:https://www.cnblogs.com/sgsoft/archive/2004/09/22/45402.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值