views:

123

answers:

1

I have developed an Office 2007 C# add-in. It uses clickonce for deployment. On systems with Office 2010 all is ok but on a machine with XP SP3, NET 3.5sp1 and Office 2007, I get a strange assembly loading error.

My add-in does not directly reference Microsoft.Office.Interop.SmartTag.dll. This gets referenced by Microsoft.Office.Tools.Commmon.v9.0.dll - which IS referenced in my add-in.

When add-in is installed with clickonce an error is reported that the Microsoft.Office.Interop.SmartTag.dll could not be found in my add-in's local install folder. Both Microsoft.Office.Tools.Commmon.v9.0.dll and Microsoft.Office.Interop.SmartTag.dll are in the GAC with correct versions.

I have used Reflector to try and detect the problem but it resolves Microsoft.Office.Interop.SmartTag.dll reference easily by finding the DLL in the GAC.

What are the possible reasons for my clickonce install to fail? The required assemblies are present but GAC is obviously not consulted.

I have found that adding |vstolocal to Manifest registry value makes everything work as expected but still I am wondering why was I getting the error in the first place.

+1  A: 

Are you deploying the PIAs as a prerequisite in the deployment, and the VSTO Runtime?

RobinDotNet
VSTO - yes, PIA - no. It turns out that PIAs is not required for Office 2007 as it is already installed by a typical install. Nevertheless, this is not the issue as the particular system got all prerequisites already installed.
wpfwannabe
You can't rely on the PIAs already being installed just because Office 2007 is installed. THis is true of Office 2010, but not 2007. Just FYI.
RobinDotNet
Can you please elaborate on why I can't rely on preinstalled PIAs? After adding `|vstolocal`, my add-in works as expected. So everything *IS* already installed.
wpfwannabe