Skip to content

Contributing

bclothier edited this page Jun 1, 2018 · 24 revisions

Initial Setup

Thank you for forking our project! Before you can submit a pull request, there are a number of steps that need to be completed.

Building

Because we have custom build system and some dependencies, it is best to build the whole solution. The debug release will be based on the Rubberduck.Deployment project and because that project depends on several other projects it is almost the last to build. Though the actual files used for addin come from other projects (e.g. Rubberduck.Core), the registration will be done using the Rubberduck.Deployment's path. The project additionally will do some configurations, including executing powershell scripts and editing the registry to maintain the COM registration automatically. We try to make that project automated as much as contributors should not have to tweak it to get building. For those interested, refer to Build Process for details within the Rubberduck.Deployment project.

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 solution 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

Once you've built the solution, make sure the Rubberduck.Main 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:

Project Properties / Debug / Start Action

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:

Projects and Solutions > Build and Run


Registering the COM types

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 add-in

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.Extension 64-bit registry key values


Not sure where or how to start? See Architecture Overview.

Clone this wiki locally