简体   繁体   English

Azure DevOps Pipeline Build 在 GAC 中丢失 DLL 引用失败

[英]Azure DevOps Pipeline Build fails missing DLL reference in GAC

We have upgraded our TFS server to Azure DevOps and I'm working on creating Pipeline builds for a solution that includes 3 projects, 2 of which compile to DLLs and one web service.我们已将 TFS 服务器升级到 Azure DevOps,我正在为包含 3 个项目的解决方案创建管道构建,其中 2 个编译为 DLL 和一个 Web 服务。 Currently the build fails with this error:目前构建失败并出现此错误:

> ##[error](XXX).sln\(XXXproject)\XXXpath\XXX.cs(8,30): Error CS0234: The type or namespace name 'Common' does not exist in the namespace
> 'XXXX' (are you missing an assembly reference?)

That line references a DLL (compiled in another solution/project) that resides in the GAC so of course when it tries to build it doesn't find it.该行引用了驻留在 GAC 中的 DLL(在另一个解决方案/项目中编译),因此当然当它尝试构建时找不到它。

I researched the error and one suggestion was to use the Download Build Artifact task to download the reference DLL from that other artifact prior to attempting to build the current solution...but I do not know what the Destination Directory should be for the Download Build Artifact task so that my current build will find it.我研究了错误,一个建议是在尝试构建当前解决方案之前,使用下载构建工件任务从其他工件下载参考 DLL...但我不知道下载构建的目标目录应该是什么工件任务,以便我当前的构建能够找到它。

Or is there better way to solve this issue?或者有没有更好的方法来解决这个问题?

Thanks谢谢

For me, it was because the referenced dll was over 100mb and I was using git lfs.对我来说,这是因为引用的 dll 超过 100mb,而我使用的是 git lfs。 In the classic pipeline editor, there is a checkbox to checkout git lfs files on the sources tab.在经典的管道编辑器中,源选项卡上有一个复选框可以检查 git lfs 文件。 For YAML, it is an option when pulling.对于 YAML,它是拉取时的一个选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .Net Core解决方案在本地构建,但无法在Azure DevOPS管道上构建 - .Net Core solutions build locally, but fails build on Azure DevOPS pipeline flutter 使用 azure devops 构建管道 - flutter build pipeline with azure devops Azure DevOps 管道缺少 ComponentSpace 许可证 - Azure DevOps pipeline missing ComponentSpace licence Azure DevOps CICD 构建管道因错误而失败:未找到指定的命令或文件 - Azure DevOps CICD build pipeline fails with error: specified command or file was not found 引用的 DLL 在 Azure 构建管道中不起作用 - Referenced DLL not working in Azure build pipeline 在离线服务器上构建 Azure Devops Pipeline - NuGet 包? - Azure Devops Pipeline build on OFFLINE server - NuGet packages? 在 Azure DevOps 中,是否可以使用 API 递归地枚举子管道构建工件? - In Azure DevOps, is it possible to enumerate children pipeline build artifacts recursively with API? 尝试在 Azure DevOps Pipeline 中构建时未找到项目文件 - Project File Not Found while attempting build in Azure DevOps Pipeline 是否可以在Azure DevOps上的构建管道中下载文件? - Is it possible to download files during the build pipeline on Azure DevOps? Azure Devops 管道中的警告是否会影响构建时间 - Does Warnings in Azure Devops pipeline affects the build time
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM