[英]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.