【问题标题】:Error MSB4062: The "GenerateAndPersistAppInfoTask" task could not be loaded错误 MSB4062:无法加载“GenerateAndPersistAppInfoTask”任务
【发布时间】:2009-10-13 15:06:10
【问题描述】:

我们在 TFS 构建的解决方案中添加了许多 Office 插件项目,现在它正在崩溃。我们正在使用 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,我可以重新创建这些插件之一并成功编译它。

求助,卡住了!

【问题讨论】:

    标签: tfs msbuild office-addins


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2018-10-19
      • 1970-01-01
      • 1970-01-01
      • 2012-03-19
      • 2012-07-30
      • 1970-01-01
      • 2014-03-01
      • 2015-10-15
      • 2018-01-28
      相关资源
      最近更新 更多