议会大楼Office加载时绑定错误:; FindRibbons&QUOT"任务意外失败 [英] Assembly binding error when building Office add-in: "FindRibbons" task failed unexpectedly

查看:498
本文介绍了议会大楼Office加载时绑定错误:; FindRibbons&QUOT"任务意外失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在努力建立一个詹金斯(构建服务器)工作,以建立我们的Office加载基于VSTO。不过,我不断收到一个奇怪的错误失败后,DLL被复制到仓构建过程项目目录:

We're trying to set up a Jenkins (build server) job to build our Office add-in based on VSTO. However, I keep getting a strange error that fails the build process after the DLL is copied to the bin directory of the project:

Error 11 The "FindRibbons" task failed unexpectedly.
System.IO.FileNotFoundException:
  Could not load file or assembly 'MyAddIn, Version=1.0.0.0, Culture=neutral, 
  PublicKeyToken=null' or one of its dependencies.
  The system cannot find the file specified.
File name: 'MyAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

所以问题是,FindRibbons的任务,该厅触发外接构建目标,已成功地确定了MyAddIn DLL作为一个Office加载项,但不能找到并加载它!

So the problem is that the "FindRibbons" task, triggered by the Office add-in build target, has successfully identified the MyAddIn DLL as being an Office Add-In, but is not able to locate and load it!

任何想法?我很想能够直接调试FindRibbons任务,但挂钩到调试编译过程似乎有点极端......

Any ideas? I'd love to be able to debug the FindRibbons task directly but hooking into and debugging the compile process seems a little extreme...

下面是一些意见:

  • 在我们构建服务器的Fusion日志结合MyAddIn组装它看起来像它看起来的地方MSBuild.exe生活( C中的文件夹中:\ WINDOWS \ Microsoft.NET \框架\ v4.0.30319 \ ),并在其他地方。 在我的dev的机器,对于MyAddIn没有融合的日志条目!但构建过程成功,Kivo工作正常。
  • 在我的两个开发和制造机器我也有融合日志条目WhereRefBind!主机=(LOCALMACHINE)!=文件名(presentationCore.dll) ExplicitBind!=文件名(MyAddIn.dll)这表明绑定成功。
  • 在此错误出现在生成服务器上我是使用Visual Studio或MSBuild的命令行来构建项目。
  • 我已经确保了.NET /的MSBuild / VS2012版本都是我开发的机器和构建服务器和错误仍然存​​在上都是相同的。唯一的区别似乎是构建服务器正在运行Windows Server 2012(因为它的Azure,我们不能旋转了一个Windows 7映像)。
  • In our build server's Fusion logs for binding the MyAddIn assembly it looks like it's looking in the folder where MSBuild.exe lives (C:\Windows\Microsoft.NET\Framework\v4.0.30319\) and nowhere else. On my dev machine, there is no Fusion log entry for MyAddIn! But the build process succeeds and Kivo works fine.
  • On both my dev and build machines I also have Fusion log entries for WhereRefBind!Host=(LocalMachine)!FileName=(PresentationCore.dll) and ExplicitBind!FileName=(MyAddIn.dll) which show the binding succeeding.
  • This error comes up on the build server whether I use Visual Studio or MSBuild from the command line to build the project.
  • I've ensured that the .NET/MSBuild/VS2012 versions are identical on both my dev machine and the build server and the error still occurs. The only difference seems to be that the build server is running Windows Server 2012 (since it's Azure, and we can't spin up a Windows 7 image).

推荐答案

我有这个问题。这显然​​造成的,因为我改变了复制本地上参考Microsoft.Office.Tools.Common.v4.0.Utilities设置从真到假。 ISYN。 (我奔忙你不)

I had this problem. It was apparently caused because I changed the "Copy Local" setting on reference "Microsoft.Office.Tools.Common.v4.0.Utilities" from True to False. ISYN. (I sh*t you not)

我已经升级,从VS2012一个项目,VS2013,发现该引用是唯一一个设置为复制本地=真。所以我将它设置为false,因为它是不同的。这引起了错误。更改回真正的解决了这个问题。

I had upgraded a project from VS2012 to VS2013 and noticed that that reference was the only one set to "Copy Local = True". So I set it to false, because it was different. This caused the error. Changing it back to True solved it.

这篇关于议会大楼Office加载时绑定错误:; FindRibbons&QUOT"任务意外失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆