I am getting the following error when running my build on Visual Studio Online (using the built-in Build Controller):
C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3962): Could not copy "d:\a\src\MySolution\MyProject\Trunk\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.xml" to "..\Build\bin\Release\Microsoft.Data.Edm.xml". Beginning retry 1 in 1000ms. The process cannot access the file '..\Build\bin\Release\Microsoft.Data.Edm.xml' because it is being used by another process.
It is never the same file either but it seems to always be either an xml or dll from the packages folder.
EDIT: I'm not sure if it is worth mentioning, but I do have multiple workspaces and multiple build definitions using this repository.
This can happen if the file referenced is open in another program or if a crash occurs while uploading. To resolve it, first make sure that no users have the file open anywhere, then reboot the machine to make sure it is not open as a remnant from a crash.
First check if the file exists (File. Exists) if so try to open for write within try and catch block, if exception is generated then it is used by another process.
Resolution. To resolve this problem, stop the application that is using port 80, and then start the Web site from IIS Manager. A simple way to see if port 80 is used by other program is to run "netstat -ano" in the command prompt. Find port 80 (Local Address 0.0.
I found the problem. Completely unrelated to the error above.
I went into the msbuild log files and found this:
Failed to produce diagnostics extension's config for MyRole\diagnostics.wadcfgx. Error : Could not find a part of the path 'd:\a\src...\MyRole\diagnostics.wadcfgx'. Done Building Project "d:\a\src...\MyCloudProject.Cloud.ccproj" (Publish target(s)) -- FAILED.
I was missing a file in source control.
I do wonder why this error did not bubble up into my build summary. And where did that initial error come from?
I am using TFS with Using Visual Studio 2013 and have been able to work around this issue by closing all open documents that I want to check-in (seems VS locked itself out) and/or resolving conflicts. The error message is sufficiently vague so as to be useless as to the actual cause of the check-in failure.
Update 02 November 2016:
I'm not sure why VS 2013 and TFS don't play nice together via the Team Explorer Check-in Pending Changes button, but it consistently fails to launch the conflict resolver, a key piece of the check-in process.
The following works for me on VS 2013 and TFS hosted on a SQLServer Express 2014 database:
1. Launch the Source Explorer: Team Explorer tab -> Source Explorer
2. Navigate to your solution repository
3. Then proceed to do the following for each project that you want to check in:
a. Right click project
b. Check in pending changes
c. Resolve conflicts and repeat steps 3a and 3b until no pending changes remain for the project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With