ChaosBlade

Hi everyone.

I recently finished developing a Word Addin that contains two panes and two ribbon buttons in a group & tab unique to my application.

Upon attempting to deploy the solution, I fail to get the addin running on any other machine but the dev one. Here's the details:

1) my assembly is signed with an SNK dedicated to our project. This shouldn't matter to office, I presume. The setup project is pretty much the default.

2) The registry values added are the default ones generated shifted to the HKLM branch. I have also added registry values for adding a schema to the HKLM\Schema Library key, and another to modify the BrowserFlags of Word documents and Macro-enabled documents to support in-browser behavior. These all seem to get installed correctly.

3) I used the sample SetSecurity Custom Installer actions to add my DLL to CAS as provided in that sample. The first code group is created under My_Computer_Zone with URL evidence, And a child group under it has FullTrust permissions with the signed StrongName as evidence.

4) The addin does appear in the COM addins box (even though the registry is pointed at HKLM and not HKCU) but is not loaded - Word changes the LoadBehavior value to 0 and refuses loading the addin at all. The Com Addin box states 'Unloaded' - I suppose that refers to the value 0 in the registry.

5) Manually loading the DLL and\or manifest file in Word results in the 'Is not a valid Office Add-In' message.

Any help will be appreciated, Thanks



Re: Visual Studio Tools for Office [Word] COM Addin Refusing To Run.

Andrew Whitechapel - MSFT

Hi

You don't specify, but reading between the lines, I believe you're building a VSTO 2005 SE add-in for Office 2007, right

To take your points in turn:

1) Your snk should be no problem.

2) Office 2007 will not look in HKLM for VSTO add-ins.

3) Your CAS setup sounds ok.

4) Office 2007 reports all installed add-ins in its UI, regardless of whether they're registered to HKLM or HKCU. Yes, the LoadBehavior=0 value translates to "Unloaded" in the UI.

5) You can't use the UI to manually load managed add-ins of any kind in Office (only unmanaged add-ins).

...so probably the solution is to register to HKCU.





Re: Visual Studio Tools for Office [Word] COM Addin Refusing To Run.

ChaosBlade

Yeah, That's the solution we came to with our MS consultant for the project. Moving the registry back to HKCU fixes the issues we were having, Hope anyone else will find this useful.