TF215097使用64位的Com Interop自定义构建活动TF215097:发生错误w

时间:2012-02-27 20:32:21

标签: tfs tfs2010 tfsbuild

TF215097:初始化构建定义的构建时发生错误{DefinitionName}:类型'Classname'上与指定的绑定约束匹配的构造函数的调用引发了异常。

好的,有些人已经很好地回答了这个问题: TFS 2010 Custom Build Activity TF215097 error

之前我遇到过同样的问题,并通过添加正确的属性进行纠正: Microsoft.TeamFoundation.Build.Client.BuildActivity(Microsoft.TeamFoundation.Build.Client.HostEnvironmentOption.Agent)

我的构建在x86机器上运行良好,但在64位构建控制器或代理上给出了错误。

背景:

我创建了几个Build活动。其中一项活动是Visual Build Pro跑步活动。我引用了Visual Build Professional 6服务器对象。 (我们有几个项目,无法更新...此时) 当我构建程序集时,VS 2010生成Native。{MyAssemblyName} .manifest

<?xml version="1.0" encoding="utf-8"?>
<assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyIdentity name="Native.EMI.TeamFoundation.Build" version="1.0.0.0" type="win32" />
  <file name="VisBuildSvr.dll" asmv2:size="712904">
    <hash xmlns="urn:schemas-microsoft-com:asm.v2">
      <dsig:Transforms>
        <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
      </dsig:Transforms>
      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
      <dsig:DigestValue>aePKKx7BgE7vN7OjQqwrQ2bvex8=</dsig:DigestValue>
    </hash>
    <typelib tlbid="{c48285d5-e97e-4824-9e14-faf8124b00a4}" version="1.0" helpdir="C:\Program Files (x86)\VisBuildPro6\System\VisBuildPro.chm" resourceid="0" flags="HASDISKIMAGE" />
    <comClass clsid="{d87ad38d-99d9-4e04-9505-696c3afde66c}" threadingModel="Both" tlbid="{c48285d5-e97e-4824-9e14-faf8124b00a4}" progid="VisBuildSvr6.Application" description="Visual Build Pro 6 server application component" />
    <comClass clsid="{1cc058ff-793f-4560-9fad-48d88db93ca9}" threadingModel="Free" tlbid="{c48285d5-e97e-4824-9e14-faf8124b00a4}" progid="VisBuildSvr6.Builder" description="Visual Build core builder component (MTA)" />
    <comClass clsid="{5ef3f30b-278b-4796-8f23-41fdd5ddc96c}" threadingModel="Both" tlbid="{c48285d5-e97e-4824-9e14-faf8124b00a4}" progid="VisBuildSvr6.BuilderSTA" description="Visual Build core builder component (MTA/STA)" />
  </file>
</assembly>

和Interop.VisBuildSvr.dll程序集

当我在同一台机器上触发Windows 64位Build Controller和Agent上的构建时,我遇到了TF错误。 我试图在控制器上附加调试器,我能看到第一个错误:

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'Interop.VisBuildSvr, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d64ea679b6fd0408' or one of its dependencies. The system cannot find the file specified.

该文件位于TFS上的自定义程序集文件夹中,也位于BuildController和BuildAgent文件夹中。

谢谢

1 个答案:

答案 0 :(得分:0)

从您的评论中,看起来您通过配置构建来调用32位版本的MSBuild来实现它。是吗?