Sunday, January 29, 2006

Debugging Visual Studio 2005 AddIns

Recently I have been working on a Visual Studio AddIn and came across a problem.

When I first created the AddIn project, a file was created in my AddIns directory (My Documents\Visual Studio 2005\Addins) called "[addin name] - For Testing.AddIn". This is used when debugging.

I created a release version of the program and deleted this file so that I could deploy the release version. Later I made a change and wanted to debug the program only to find it no longer appeared in the visual studio tools menu. The "for testing.addin" file had not been recreated by visual studio as I had assumed it would.

Fortunately the problem was easy to resolve:
  1. Copy the "[project name].AddIn" file from your project root to the AddIns directory (My Documents\Visual Studio 2005\Addins)
  2. Rename the file to "[project name] - For Testing.AddIn".
  3. Open the file in a text editor and alter the path where it references your dll (<assembly>) to point to your debug dll.

You should now be able to debug your project and have the addin display in your tools menu.

1 Comments:

Anonymous Branko said...

Thank you for posting this. Solved a problem for me.

11:58 AM  

Post a Comment

<< Home