2009-10-13 50 views
1

我们在我们的TFS构建的解决方案中添加了一些Office AddIn项目,现在已经破产。我们正在使用Visual Studio和TFS 2008(SP1)。 4个项目已被添加,每个以下的目标...错误MSB4062:无法加载“GenerateAndPersistAppInfoTask”任务

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

生成日志报告以下...

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存在于服务器上,并在GAC中正确安装。 Visual Studio Tools for Office(2005 & 3.0)也全部安装。 如果远程连接到服务器并运行Visual Studio,我可以重新创建其中一个插件并成功编译它。

帮助,卡住了!

回答

0

原来我需要安装到GAC的Microsoft.VisualStudio.Tools.Applications.Hosting.dll。我已安装Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0.dll,但这不是兼容版本。