Excel won't open/launch VSTO AddIn when running in debug mode of Visual Studio 2010

前端 未结 6 650
没有蜡笔的小新
没有蜡笔的小新 2020-12-30 09:00

I had previously installed the VS11 beta, and had some issues with my Visual Studio 2010 instance, which you can see here how they were resolved: Excel AddIn Click Once depl

相关标签:
6条回答
  • 2020-12-30 09:33

    I also had the same problem, what I didn't understand was :

    Why I re-install Office 2016, I don't change my code neither VS setting but I get a cant load error message ?

    After many many hours, repairing Office and VS and getting the same error message, I observed that the Addin was starting well in Release config, I started checking the difference between the both config in my code. I found that debug config was targeting to x86 proc bug release to any cpu

    So Office x64 didn't load x86 dlls (in my case)

    0 讨论(0)
  • 2020-12-30 09:39

    I had the same problem in Excel.

    The following worked for me:

    Go to the following key....

    HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Excel\AddInLoadTimes
    

    see if your plug-in is listed. if so, delete it.

    now run your app from Visual studio again.

    This worked for me, hope it can help someone else.

    0 讨论(0)
  • 2020-12-30 09:40

    You can reenable a hard-disabled Add-In with Excel

    http://msdn.microsoft.com/en-us/library/ms268871(v=vs.80).aspx

    0 讨论(0)
  • 2020-12-30 09:43

    I've found the issue which was not letting me run my project in 'Debug' configuration mode, though it worked in 'Release' mode. At some point, the AddIn, got hard-disabled (not sure if that's the term to use). At that point, trying to re-enable from within Excel doesn't do anything. Within the registry, there is a folder where disabled AddIns are flagged. I deleted all of the keys from this folder except for "(Default)" and now my AddIn works when launching from Visual Studio 2010 in 'Debug' mode.

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Resiliency\DisabledItems
    

    enter image description here

    0 讨论(0)
  • 2020-12-30 09:49

    When you run through Visual Studio 2010 does it hits the breakpoint in the addin_startup event. If not try to debug this way

    Hope this helps you

    0 讨论(0)
  • 2020-12-30 09:49

    I had the same problem with a Word VSTO, but there was no Resiliency\DisabledItems folder in my registry, so I think it was never hard disabled (as in @mservidio's solution). What worked for me was to edit the Manifest path in HKEY_USERS\<user key>\Software\Microsoft\Office\Word\Addins\<Add-In name> to reflect the 'Debug' path rather than the 'Release' path.

    To find the right folder it might be easiest just searching for the Add-In name and checking that any Manifest keys refer to the Debug path.

    enter image description here

    0 讨论(0)
提交回复
热议问题