-
Notifications
You must be signed in to change notification settings - Fork 309
Contributing
Thank you for forking our project! Before you can submit a pull request, there are a number of steps that need to be completed.
Because we have custom build system and some dependencies, there are some setup steps necessary.
The first step is to configure the powershell execution policy as the build relies on powershell scripts as part of its build. Launch powershell as an administrator and run the following command:
Set-ExecutionPolicy RemoteSigned
NOTE: There is a separate execution policy for 64-bit Powershell and 32-bit Powershell. You must match with the bitness of the devenv.exe
which may be 32-bit and therefore set the execution policy in the 32-bit PowerShell.
You should then launch the Visual Studio as an administrator.
Second step is to ensure you are on Visual Studio 2017 15.5.4 or later. If you are not, please update to at least that version or newer.
Then, you need to install Visual Studio Extensions. You can use Tools
-> Extensions and Updates
. Go to Online
pane and locate Wix Toolset Visual Studio 2017 Extension
and install. A restart of Visual Studio may be required.
Once the Visual Studio is restarted, verify that you are able to load the Rubberduck.Deployment.Wix
and if necessary, right-click it and choose Reload project
to ensure that it is loaded into the solution. Once it is loaded, you should be able to proceed onwards.
The next step is to get a rubberduck.dll
build.
If you have a release version installed, you need to uninstall it first. The installer registers COM components against the release build, in the install folder. You'll manually re-register these COM components in a minute, but first you need a build.
Building Rubberduck should automatically install the following Nuget packages (which may be changed as codebase develop):
- Antlr4.4.6.4
- Antlr4.CodeGenerator.4.6.4
- Antlr4.Runtime.4.6.4
- Castle.Core.4.1.1
- Castle.Windsor.4.0.0
- EasyHook.2.7.6578.1
- Moq.4.2.1507.118
- NLog.4.4.12
- NLog.Schema.4.4.12
- NUnit.3.9.0
- NUnit3TestAdapter.3.9.0
- System.ValueTuple.4.4.0
- WiX.Toolset 3.9.1208
Once you've built the solution, make sure the Rubberduck
project is the solution's startup project, and that it's configured to launch your favorite VBE host on startup, so that Visual Studio automatically attaches its debugger to the process when you hit F5 to launch the solution:
If there were any build errors, it is possible that your debug session is loading the previous build of that assembly.
To prevent this, tweak the debugger settings:
Building the Rubberduck solution should normally perform a registration of the COM types automatically for you. Refer to Build Process for full details.
Note: for historical information you can read about registering with regasm.exe
. It is STRONGLY recommended that you do NOT use this with the current build process however.
Registering the COM types isn't enough. Every VBE host application will be looking for installed addins under a specific registry key in the HKCU hive.
Bring up the Windows Registry Editor, and depending on the bitness of the VBE host(s) you want to register Rubberduck with, create a Rubberduck.Extension
key:
32-bit hosts:
HKCU/SOFTWARE/Microsoft/VBA/VBE/6.0/Addins/Rubberduck.Extension
64-bit hosts:
HKCU/SOFTWARE/Microsoft/VBA/VBE/6.0/Addins64/Rubberduck.Extension
The Rubberduck.Extension
COM type was registered when you ran the regasm.exe
command in the previous step. If you have both 32-bit and 64-bit VBE host applications and you want both to load the Rubberduck add-in, you'll need to create the two keys. Otherwise, just create the key that you need for the bitness of your VBE host.
Define the following values under the Rubberduck.Extension
key:
-
Description
(string value): "Rubberduck" -
FriendlyName
(string value): "Rubberduck" -
LoadBehavior
(DWORD): 3
Rubberduck.Deployment.Wix
doesn't load or has (incompatible)
This usually indicates that the Visual Studio extensions for WiX is not install. Obtain the Visual Studio extension for WiX which can be done either via the Tools
-> Extensions and Updates
and searching Online
for WiX Toolset Visual Studio 2017 Extension
, or obtaining it directly from Wix. Note: you do not need the full toolset; only the extension is sufficient.
Not sure where or how to start? See Architecture Overview.
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