Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTO Excel Workbook add-in not loading via Visual Studio debugger on 1 computer

I have a VSTO Excel workbook project that I can debug fine on my laptop. The project solution also accesses some special hardware on another computer and the project was debugging there fine yesterday in VS2010. Today, it stopped hooking into Excel on debugging on this computer. F5 starts Excel, but the add-in doesn't load breakpoints in the Workbook startup events, etc... Same project from version control debugs fine on my laptop, so something is whacked with Excel or VS on this computer. I’ve seem some related notes/posts on VSTO logging and resetting Excel, but has any beat their head against this?

UPDATE: this solution didn't work for me. As I was typing I found this similar and promising title... Excel won't open/launch VSTO AddIn when running in debug mode of Visual Studio 2010

like image 423
kenny Avatar asked May 21 '12 00:05

kenny


2 Answers

My issue occurred due to having the release version of the app installed and trying to run the debug version. Have to then uninstall the release version, Clean then Build, then re run the add in.

Weird!

like image 154
gorlaz Avatar answered Nov 15 '22 20:11

gorlaz


You may need to completely wipe all traces of previously installed versions of your VSTO. Try this:

  1. Remove the registry key for your VSTO from HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\AddIns. If you're working with Office 32-bit on a 64-bit machine then look in HKEY_CURRENT_USER\SOFTWARE\WOW6432Node\Microsoft\Office\Excel\AddIns.

  2. Remove folder C:\Users\ {username} \AppData\Local\Apps\2.0 (You may need to reboot the machine first to release locks on files within this folder structure.)

  3. Open Excel. Go to Files > Options > Add-Ins > Manage COM Add-Ins and remove your VSTO if it is listed.

  4. Clear the ClickOnce cache by typing this at the command prompt: rundll32 dfshim CleanOnlineAppCache

If that still doesn't work then also try removing all keys/values from the registry that reference your VSTO and its related assemblies.

like image 37
Keith Avatar answered Nov 15 '22 21:11

Keith