Question

We have added a number of Office AddIn projects to our TFS-built solution and now it's breaking. We are using Visual Studio and TFS 2008 (SP1). 4 projects have been added, one for each of the following targets...

  • Word 2003
  • Word 2007
  • Excel 2003
  • Excel 2007

The Build Log reports the following ...

C:\Program Files\MSBuild\Microsoft.VisualStudio.OfficeTools2.targets(116,9): error MSB4062: The "GenerateAndPersistAppInfoTask" task could not be loaded from the assembly Microsoft.VisualStudio.Tools.Applications.Hosting, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications.Hosting, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.

Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll exists on the server and is installed correctly in the GAC. Visual Studio Tools for Office (2005 & 3.0) are also all installed. If remote onto the server and run Visual Studio I can re-create one of these addins and successfully compile it.

Help, stuck!

Was it helpful?

Solution

Turns out I needed Microsoft.VisualStudio.Tools.Applications.Hosting.dll installed to the GAC. I already had Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0.dll installed, but this wasn't a compatible version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top