错误 MSB4062:“GenerateAndPersistAppInfoTask”任务无法加载
我们已将许多 Office AddIn 项目添加到我们的 TFS 构建的解决方案中,现在它正在崩溃。我们使用 Visual Studio 和 TFS 2008 (SP1)。已添加 4 个项目,每个项目对应以下目标...
- 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,我可以重新创建这些插件之一并成功编译它。
求助,卡住了!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
结果我需要将 Microsoft.VisualStudio.Tools.Applications.Hosting.dll 安装到 GAC。我已经安装了 Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0.dll,但这不是兼容版本。
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.