How to debug
Debugging an add-in for the very first time can be difficult, especially when there’s a COM custom tool involved. Once you follow the following steps, however, you’ll be bending Visual Studio to your will in no time. Use the installer! Even when debugging,
you need to use the installer. It takes a few steps, but it’s fullproof and takes care of all the COM registrations, which are critical.

Shut down all Visual Studio instances

Uninstall dotNails (if installed). If you ever have your dotNails.AddIn file on your hard drive (wherever you installed dotNails), VS will load the add in on launch, and you won’t be able to build.

Open up dotNails.sln, dotNails.CustomTool.sln, and dotNails.Installer.sln in three Visual Studios. Any new VS instances will load the add in, but these can now remain open without blocking the build.

Build dotNails.sln, dotNails.CustomTool.sln, and dotNails.Installer.sln with all your fancy new code. Build all three, and build the installer last.