I have a larget project and when I run msbuild, it reports below errors from time to time, like 5 out of 10 times it reports errors.
When it fails, I have to msbuild multiple times to get it built successfully.
I feel like it is due to some kind of parellal building which causing issues that when a project tries to access dll A, dll A might still be building so it reports the dll is locked by msbuild.exe.
Any idea?
Could not copy "D:\repo\MyRepo\target\dev\MyDir\debug\amd64\myTest.dll" to "d:\repo\MyRepo\Target\Distrib\MyDirOther\all\debug\amd64\myTest.dll". Exceeded retry count of 10. Failed. The file is locked by: "System (4), MSBuild.exe (11396), MSBuild.exe (11296)"
error MSB3021: Unable to copy file "D:\repo\MyRepo\target\dev\MyDir\debug\amd64\myTest.dll" to "d:\repo\MyRepo\Target\Distrib\MyDirOther\all\debug\amd64\myTest.dll". The process cannot access the file 'd:\repo\MyRepo\Target\Distrib\MyDirOther\all\debug\amd64\myTest.dll' because it is being used by another process.