[英]CSC error CS0006: Metadata file '…dll' could not be found - But file exists
CSC error CS0006: Metadata file 'C:\\BuildAgent\\work\\cbcbc45410f50008\\Output\\bin\\Release\\abc.xyz.dll' could not be found. CSC错误CS0006:找不到元数据文件'C:\\ BuildAgent \\ work \\ cbcbc45410f50008 \\ Output \\ bin \\ Release \\ abc.xyz.dll'。
On a teamcity build that worked fine until now, the build starts intermittently failing for the CS0006 error. 在一个到目前为止工作正常的teamcity构建中,构建开始间歇性地因CS0006错误而失败。
I see a lot of posts about the projects build ordering related cause for this issue. 我看到很多关于项目的帖子构建了与此问题相关的订购原因。 But I doubt if this one is related to build orders as I see that they are set right. 但我怀疑这个是否与构建订单有关,因为我发现它们是正确的。 Also the build configuration and platforms are mentioned right in the project file and on invocation of the msbuild. 此外,在项目文件和msbuild的调用中都提到了构建配置和平台。 Moreover the abc.xyz.dll exists on the file system with a creation time earlier than the failure time. 此外,文件系统上存在abc.xyz.dll,其创建时间早于失败时间。
I have a feeling that it is some CPU or thread race condition. 我有一种感觉,它是一些CPU或线程竞争条件。 I say this because when it was consistently failing, I added file access auditing on the dll file, as the build was running. 我说这是因为当它一直失败时,我在dll文件上添加了文件访问审核,因为构建正在运行。 But then this time the build would succeed. 但是这次构建会成功。 I thought I was loading the processor differently by doing some work on the same agent. 我以为我通过在同一个代理上做一些工作来加载处理器。
I believe I am not alone. 我相信我并不孤单。 Thanks for any answers or directions. 感谢您的任何答案或指示。
我能够通过删除项目引用然后再将其添加回来来克服这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.