Azure托管代理水晶报告

时间:2017-11-24 03:29:29

标签: azure-devops azure-pipelines azure-devops-self-hosted-agent

我正在使用托管构建及其失败并出现错误,无法找到汇编水晶报告。如何使用托管构建代理程序使用Crystal报表?

2 个答案:

答案 0 :(得分:0)

由于托管代理未安装Visual Studio的Crystal报表,因此无法由托管代理构建Crystal报表。

您应该按private agent构建水晶报告,为可视工作室安装Crystal报告。

答案 1 :(得分:0)

虽然确实确实没有安装安装了Visual Studio的Crystal Reports的托管代理,但是不需要COM组件来执行编译。您需要构建的只是您的应用程序引用的.NET DLL的副本。

一种解决方法是将您引用的DLL添加到存储库中,并执行条件提示路径以在未将其安装在计算机的默认位置时使用它们。

<Reference Include="CrystalDecisions.CrystalReports.Engine, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath Condition="!Exists('$(MSBuildProgramFiles32)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.CrystalReports.Engine.dll')">..\..\lib\CrystalDecisions.CrystalReports.Engine.dll</HintPath>
  <Private>False</Private>
</Reference>
<Reference Include="CrystalDecisions.ReportSource, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath Condition="!Exists('$(MSBuildProgramFiles32)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.ReportSource.dll')">..\..\lib\CrystalDecisions.ReportSource.dll</HintPath>
  <Private>False</Private>
</Reference>
<Reference Include="CrystalDecisions.Shared, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath Condition="!Exists('$(MSBuildProgramFiles32)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.Shared.dll')">..\..\lib\CrystalDecisions.Shared.dll</HintPath>
  <Private>False</Private>
</Reference>
<Reference Include="CrystalDecisions.Windows.Forms, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath Condition="!Exists('$(MSBuildProgramFiles32)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.Windows.Forms.dll')">..\..\lib\CrystalDecisions.Windows.Forms.dll</HintPath>
  <Private>False</Private>
</Reference>

在这里,DLL被放置在存储库根目录下名为lib的文件夹中。 !Exists条件检查DLL是否位于默认位置,否则将切换为使用lib文件夹中的本地DLL。

或者,可以将二进制文件托管在私有的NuGet feed或MyGet feed上,而不是将二进制文件签入到存储库中。请注意,您也可以参考unofficial copies of these libraries on NuGet,但是通常不清楚软件包作者提交了哪种版本的二进制文件。