9
votes

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

4
Try Build | Clean Solution and try again? Sometimes a simple step can also help.Siddharth Rout
@SiddharthRout, do you really think I didn't?kenny
Check the path of your vsto file in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\AddIns and make sure it is your VS output folder as well.Kiru
@Kiru, interesting enough but my VSTO wasn't there and adding it didn't help. :( Thanks but do you have any other thoughts?kenny
If you are running through visual studio then the path here HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\AddIns should be pointing your output bin folder not just .vsto file it should be all the binaries. This happens when you change from debug and release because the output path changesKiru

4 Answers

9
votes

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!

6
votes

Just check if the add-in is disabled.

Office menu > {Word/Excel/PowerPoint} Options > Under “Manage” select “Disabled Items” and then click Go.

For more information read http://blogs.msdn.com/b/vsod/archive/2008/04/22/troubleshooting-com-add-in-load-failures.aspx

/Artha Wijendra

4
votes

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.

2
votes

When my Excel Add-In would not load when I hit "Start" in Visual Studio to debug, all I ended up doing to fix the issue was "Rebuild" my solution.