Skip to content

Installing

Mathieu Guindon edited this page Jul 2, 2023 · 37 revisions

The easiest way to use Rubberduck is to download the latest installer from our releases page. You can choose:

If you want to contribute to the project, please see the Contributing page.

Each release comes with a number of downloadable assets. The installer download is named Rubberduck.Setup.{version}.exe:

downloadable assets

The .hash file is a SHA256 hash of the installer, provided as a convenience. The Rubberduck.CodeAnalysis.xml asset is downloaded by the website to generate the inspections pages off xml-doc in the source code. The other downloadable assets are compressed (.zip/.tar.gz) source code files, if you wish to download Rubberduck's source code and build the add-in yourself.

Pre-release tags and their downloadable assets are generated automatically by our AppVeyor build server, as soon as a pull request is merged into the [next] branch. These tags include a link to the AppVeyor build, which links back to the merge commit of the pull request that was merged.

Stable release tags (also dubbed "green release") include detailed release notes, most of which would also have been covered in an announcement post on the project's blog.

System Requirements

  • Microsoft .NET Framework 4.6
  • Windows Vista Service Pack 2 or Windows 7 Service Pack 1 or higher
    • Windows Vista RTM, Windows Vista SP1 and Windows 7 RTM are not supported
    • Windows prior to Windows 10 may require installation of the .NET framework

Supported Hosts

Rubberduck is "officially" supported in the following VBE hosts:

  • Microsoft Office 2000 or higher
  • Microsoft Visual Basic 6 SP6

That said, Rubberduck aims to be compatible with any Visual Basic host that supports the IDTExtensibility2 interface. The development team regularly test against the following hosts:

  • Microsoft Office 2010 onwards (32 and 64 bit)
  • Microsoft Visual Basic 6 SP6

There are many more hosts out there, too many to test against. If you do find an issue, by all means, please share on GitHub! We will do our best to reproduce and resolve it.

Installing for non-admin users

NOTE: Not all VBA hosts may support per-user installation. This has been tested on most VBA hosts but there are at least one known case where this doesn't work and requires an admin install (Sage in this case). However, Office hosts should work. VB6 generally expects admin rights, so if you want to use Rubberduck in VB6 it's recommended to install for all users.

The Rubberduck installer does not require administrative privileges to install if you use the per user mode. Administrative privileges is only required if you want to install for all users on the same machine, notably to register the COM types that enable the unit testing feature. Because VBE add-ins need to be registered under the HKCU registry hive, the installer will create the Addins key for the admin user that is running the installer.

When running the installer for per-user mode, the installer will register the add-in for you. However, it cannot register for other users on the machine. Therefore, to register the add-in for a non-admin user who didn't install the Rubberduck but can access it on the same machine, the user needs to run Register VBE Add-in under the start menu to enable the user of Rubberduck for their profile.

If you want to create a login script and use it as a company-wide policy, the following PowerShell commands may be helpful in doing the equivalent:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
New-Item -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns\Rubberduck.Extension' -Force
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns\Rubberduck.Extension' -Name Description -PropertyType String -Value 'Rubberduck'
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns\Rubberduck.Extension' -Name FriendlyName -PropertyType String -Value 'Rubberduck'
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns\Rubberduck.Extension' -Name LoadBehavior -PropertyType DWord -Value 3

New-Item -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns64\Rubberduck.Extension' -Force
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns64\Rubberduck.Extension' -Name Description -PropertyType String -Value 'Rubberduck'
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns64\Rubberduck.Extension' -Name FriendlyName -PropertyType String -Value 'Rubberduck'
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns64\Rubberduck.Extension' -Name LoadBehavior -PropertyType DWord -Value 3

This is now included in the release as a shortcut in the start menu folder or at C:\ProgramData\Rubberduck\Rubberduck.RegisterAddIn.bat

Troubleshooting

Troubleshooting: COM registration issues

Not following Microsoft instructions for installing and using different versions of Office on the same PC can (will) break COM registration of important components, causing InvalidCastException errors when Rubberduck tries to communicate with Office CommandBar objects in the VBE.

  • If you are installing Rubberduck to be hosted in VB6, Microsoft Office should have been installed after Visual Studio 6.0 (note that Rubberduck will not work in VB6 if Office isn't installed at all, see #4192)
  • If you are running multiple Office versions side-by-side, note that side-by-side Office 365 (non-MSI) installs is not a supported scenario. Make sure the side-by-side installations were made in chronological order (oldest first).

Troubleshooting: High-DPI displays

VB6 and some older VBA hosts may have difficulty displaying High-DPI settings above 125%. This is because these hosts are not DPI-aware, but Windows Presentation Foundation (as used by Rubberduck) is DPI-aware. This can lead to corrupted displays where the host elements are not scaled correctly once Rubberduck loads.

To solve this under Windows 8.1 or 10, go to the Rubberduck general settings, tick the "Set DPI unaware" option and restart the host. For earlier Windows versions, use the "Windows XP scaling mode" under Advanced options when setting the system DPI.

Troubleshooting: Rubberduck Add-In could not be loaded

There's the odd chance that, despite following all of the above steps, you bring up the VBE and see this after installing:

HRESULT E_FAIL error at startup

It seems sometimes, the installer fails to correctly register Rubberduck's COM types, for a reason that remains to be found.

There's an easy fix though. NOTE: This requires admin privilege because it will write to the HKLM hive:

Note: 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 install folder)\rubberduck.dll" /codebase /tlb

64-bit host:

c:\windows\microsoft.net\framework64\v4.0.30319\regasm.exe "(path to install 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

Uninstalling

Rubberduck can be uninstalled using Windows' standard add/remove programs control panel. Uninstalling will delete all Rubberduck registry keys, as well as the add-in software. User settings /configuration may persist under %APPDATA%\Rubberduck. If Rubberduck was installed for all users with an elevated/admin process, administrative privileges will be required to uninstall.

Clone this wiki locally