1

Looks like multiple msbuild processes trying to access the file

Summary

Debug | Any CPU 6 error(s), 10 warning(s) $/Development/SampleApp.sln - 6 error(s), 10 warning(s) C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3797): Unable to copy file "D:\Builds\74\653\src\References\EntityFramework.dll" to "D:\Builds\74\653\bin\EntityFramework.dll". Access to the path 'D:\Builds\74\653\bin\EntityFramework.dll' is denied. C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3797): Unable to copy file "D:\Builds\74\653\src\References\EntityFramework.dll" to "D:\Builds\74\653\bin\EntityFramework.dll". Access to the path 'D:\Builds\74\653\bin\EntityFramework.dll' is denied. C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3797): Unable to copy file "D:\Builds\74\653\src\References\EntityFramework.dll" to "D:\Builds\74\653\bin\EntityFramework.dll". Access to the path 'D:\Builds\74\653\bin\EntityFramework.dll' is denied. C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3797): Unable to copy file "D:\Builds\74\653\src\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll" to "D:\Builds\74\653\bin\EntityFramework.dll". Access to the path 'D:\Builds\74\653\bin\EntityFramework.dll' is denied. C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3797): Unable to copy file "D:\Builds\74\653\src\References\EntityFramework.dll" to "D:\Builds\74\653\bin\EntityFramework.dll". Access to the path 'D:\Builds\74\653\bin\EntityFramework.dll' is denied. C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3797): Unable to copy file "D:\Builds\74\653\src\EY.MDM\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll" to "D:\Builds\74\653\bin\EntityFramework.dll". Access to the path 'D:\Builds\74\653\bin\EntityFramework.dll' is denied. Other Errors 1 error(s) Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

bijayk
  • 556
  • 3
  • 18

1 Answers1

0

Please also try to manually build it on the build agent.If you get same result. Possible duplicate with this question TFS 2012 Build "Access to Path Denied"

You can try to use the workaroud in Mike Asdf's answer

  • Obviously one way to prevent the issue is to explicitly run msbuild with /p:BuildInParallel=false or /m:1 or /maxcpucount:1 (or omit the
    argument entirely) to force single-threaded mode.
  • Another workaround I attempted was to manually pass /p:AllowedReferenceRelatedFileExtensions=none to msbuild, which
    prevents all pdb and xml files from being copied from referenced
    libraries.
  • The ultimate workaround that I used was one I discovered by decompiling the source code for Microsoft.Build.Tasks.Copy
Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62