What is the equivalent to regsvr32 in .NET?

Published 02 August 04 02:15 PM

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

 
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Brian said on August 2, 2004 2:19 PM:
Regasm is hard to pronounce without making it sound like orgasm. (unless you say REJ ASM)
# Joe White said on August 2, 2004 3:12 PM:
It might worth mentioning a couple of related utilities: gacutil and installutil. They both do similar things to regasm, but under different circumstances (i.e., use gacutil when you don't actually have COM exports; use installutil for a Windows service).
# Rob Mensching said on August 2, 2004 3:31 PM:
And, IMHO, you should never use these tools for real deployments. SelfReg (in all of its guises) is evil outside of the developer environment. Please, don't expect setup to RegAsm (or regsvr32) your files.
# Julie Lerman said on August 2, 2004 7:18 PM:
aww - and here I thought it was Copy/Paste! (just kidding...)
# Ron said on August 3, 2004 5:14 AM:
Rob,

Could you explain your position further? I work on a COM-dependent system. If I develop .NET assemblies they will be for deployment in this existing system. It won't see a rewrite to .NET for some time (if at all). Just how am I to use the assemblies if I "should never use these tools [Regasm] for real deployments"?
# Eusebio Rufian-Zilbermann said on August 5, 2004 3:18 PM:
And then you have regsvcs for services...
# RebelGeekz said on December 28, 2004 4:54 AM:
[http://itpeixun.51.net/][http://aissl.51.net/][http://kukuxz003.freewebpage.org/][http://kukuxz001.51.net/][http://kukuxz003.51.net/][http://kukuxz005.51.net/][http://kukuxz002.51.net/][http://kukuxz004.freewebpage.org/][http://kukuxz007.51.net/][http://kukuxz001.freewebpage.org/][http://kukuxz006.51.net/][http://kukuxz002.freewebpage.org/][http://kukuxz004.51.net/][http://kukuxz008.51.net/][http://kukuxz009.51.net/][http://kukuxz005.freewebpage.org/][http://kukuxz006.freewebpage.org/][http://kukuxz007.freewebpage.org/][http://kukuxz009.freewebpage.org/]
# FAQ C# (par Yannick Lejeune) said on August 23, 2005 5:08 AM:
# kevin Mocha - Deploy com dll said on November 26, 2008 10:41 AM:

PingBack from http://blog.lulutech.com/PermaLink,guid,46a6e29d-b54c-4a54-ba0b-e90d0a676d01.aspx

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

This Blog

Syndication

Page view tracker