使用 TFS Build 时代理的组件

Brokered components when using TFS Build

使用 TFS 构建我的应用程序时,当我有一个包含代理组件的应用程序时,它会失败。

这是我在我的 Package.appxmanifest 中使用的,当我在本地 build/run 时它可以工作。我如何仍然 build/deploy 使用 TFS 并保留我的代理组件?这可能吗?

<Extensions>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>clrhost.dll</Path>
        <ActivatableClass ActivatableClassId="BrokeredRuntimeComponent.{ClassName}" ThreadingModel="MTA">
          <ActivatableClassAttribute Name="DesktopApplicationPath"
                                     Type="string"
                                     Value="C:\Source\{AppName}\Debug\BrokeredRuntimeComponentProxy" />
        </ActivatableClass>
      </InProcessServer>
    </Extension>
  </Extensions>

当我 运行 构建时,出现以下错误。我无法访问 TFS 上的 运行 和 regsvr32 /s。这是需要在每个客户端上完成的事情,还是可以在构建服务器上完成并在每个设备上 运行 完成?我认为,如果可以以管理员身份将构建服务提供给 运行,它可能会起作用。这甚至可能吗?

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets (1620): Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions.

如果我放在这里的任何内容不清楚,请告诉我,希望我能澄清。

您需要在构建服务器上安装您在本地 运行 构建所需的所有内容。如果您需要某些已注册的组件,则需要提前或在构建时完成。

如果在构建时,TF 构建运行s 的帐户需要执行该操作的权限。