Search code examples
.netgitazure-devopsbitbucketazure-devops-pipelines

Devops & Bitbucket Build Pipeline - not enough space on the disk


I'm trying to build Azure devops pipeline which connected with project uploaded to Bitbucket repository, but each build I faced these 3 errors

Error MSB3491: Could not write lines to file "obj\Release\XXX.txt". There is not enough space on the disk.

Error MSB3021: Unable to copy file "D:\a\1\s\XX\packages\Microsoft.Net.Compilers.1.3.2\tools\Microsoft.CodeAnalysis.dll" to "bin\roslyn\Microsoft.CodeAnalysis.dll". There is not enough space on the disk.

Error MSB3027: Could not copy "D:\a\1\s\XXX\packages\Microsoft.Net.Compilers.1.3.2\tools\Microsoft.CodeAnalysis.VisualBasic.dll" to "bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll". Exceeded retry count of 10. Failed.

How can I know where is the problem (Devops or Bitbucket) and how to fix it.


Solution

  • According to Microsoft's documentation,

    (Microsoft-hosted agents) Provide at least 10 GB of storage for your source and build outputs.

    So, if you are getting "not enough space in disk error" it might mean that the amount of disk space used by your source code (files, repos, branches, etc), together with the amount of disk space taken by your build output (files generated as a result of the build process) is crossing the 10 GB of storaged provided by your DevOps plan.

    Workaround, you could try to split your repo.