我们已将许多 Office AddIn 项目添加到我们的 TFS 构建的解决方案中,现在它正在崩溃。我们使用 Visual Studio 和 TFS 2008 (SP1)。添加了 4 个项目,每个项目对应以下目标......

  • 字2003
  • 单词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,我可以重新创建这些插件之一并成功编译它。

求助,卡住了!

有帮助吗?

解决方案

结果我需要将 Microsoft.VisualStudio.Tools.Applications.Hosting.dll 安装到 GAC。我已经安装了 Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0.dll,但这不是兼容版本。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top