-
Notifications
You must be signed in to change notification settings - Fork 316
Using regasm.exe to register COM types (Outdated)
The information below is preserved as strictly for historical information but no longer should be applicable. It is NOT recommended that you perform a regasm.exe because that will write the registration data to the HKLM hive whereas the solution will use the HKCU hive. HKCU normally takes priority over HKLM but if there are stale keys in HKLM that do not exist in the HKCU, that may create or hide issues.
If you have an existing installation/build you need to manually unregister, you can use regasm.exe to do that.
-
If your VBE host application is 32-bit, you need to register the assembly using the 32-bit framework.
-
If your VBE host application is 64-bit, you need to register the assembly using the 64-bit framework.
The bitness of your OS is irrelevant.
Bring up an administrative command prompt (cmd.exe), and execute one of the following commands:
32-bit host:
c:\windows\microsoft.net\framework\v4.0.30319\regasm.exe "(path to project \bin folder)\rubberduck.dll" /codebase /tlb /u
64-bit host:
c:\windows\microsoft.net\framework64\v4.0.30319\regasm.exe "(path to project \bin folder)\rubberduck.dll" /codebase /tlb /u
You should see these output messages:
Microsoft .NET Framework Assembly Registration Utility version 4.6.1038.0 for Microsoft .NET Framework version 4.6.1038.0 Copyright (C) Microsoft Corporation. All rights reserved.
Types un-registered successfully Type library '' un-registered successfully
32-bit host:
c:\windows\microsoft.net\framework\v4.0.30319\regasm.exe "(path to project \bin folder)\rubberduck.dll" /codebase /tlb
64-bit host:
c:\windows\microsoft.net\framework64\v4.0.30319\regasm.exe "(path to project \bin folder)\rubberduck.dll" /codebase /tlb
You should see these output messages:
Microsoft .NET Framework Assembly Registration Utility version 4.6.1038.0 for Microsoft .NET Framework version 4.6.1038.0 Copyright (C) Microsoft Corporation. All rights reserved.
RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully
rubberduckvba.com
© 2014-2025 Rubberduck project contributors
- Contributing
- Build process
- Version bump
- Architecture Overview
- IoC Container
- Parser State
- The Parsing Process
- How to view parse tree
- UI Design Guidelines
- Strategies for managing COM object lifetime and release
- COM Registration
- Internal Codebase Analysis
- Projects & Workflow
- Adding other Host Applications
- Inspections XML-Doc
-
VBE Events