0

My Team Project consists of a Web Forms application and WCF Services, in two separate solutions (the WCF services are hosted on a server within the domain, the web app is in the DMZ). I have two build definitions for my Team Project: a CI build and a manual build Yesterday I merged a branch back into my trunk to prepare for a deployment. When I checked in my merge the CI build kicked off...and succeeded. So then I queued the manual build (the manual build is what ends up on prod server). The manual build failed. It fails everytime I run it now, however the CI build succeeds every time. The error from the build log is pasted below. I don't know how I broke this build, and I'm confused as to why the CI build succeeds but the manual build fails (same build definition except the drop location is different and the trigger is different).

Error:

Exception Message: Access to the path 'C:\Builds\1\My Web App\My Web App\Sources\MyAppWcfServices\Services\Messages' is denied. (type UnauthorizedAccessException) Exception Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.CommonInit() at System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption, Boolean checkHost) at System.IO.Directory.InternalGetDirectories(String path, String searchPattern, SearchOption searchOption) at Microsoft.TeamFoundation.Common.FileSpec.DeleteDirectoryInternal(String path) at Microsoft.TeamFoundation.Common.FileSpec.DeleteDirectoryInternal(String path) at Microsoft.TeamFoundation.Common.FileSpec.DeleteDirectoryInternal(String path) at Microsoft.TeamFoundation.Common.FileSpec.DeleteDirectoryInternal(String path) at Microsoft.TeamFoundation.Common.FileSpec.DeleteDirectory(String path, Boolean recursive) at Microsoft.TeamFoundation.Build.Workflow.Activities.DeleteDirectory.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)

Things I've read/tried:

I do not have my obj or bin directories in version control. This build definition has been working great for months, up until yesterday. I'm not sure what happened when I merged that would've caused this. There were no conflicts in my merge, it was easy peasy....until I tried to build.

Community
  • 1
  • 1
CDR12
  • 481
  • 6
  • 21

3 Answers3

1

just go to the Build controller server and stop the "Visual Studio Team Foundation Build Service Host 2013" and delete the Files or folder which you have the error in your message and start the service again

0

Have you checked if the actual file is locked? try a tool like unlocker http://www.emptyloop.com/unlocker

Kev
  • 286
  • 2
  • 5
  • Thanks! I found the path the error is referring to. The Messages directory is read-only for some reason and I cannot make it writeable. I'm escalating to our server team to see if they can help. – CDR12 Aug 27 '13 at 17:27
0

I have seen this error happening when a particular folder/file is opened in iexplorer/cmd.exe etc (either by you or some other user). When TFS tries to clean up the directory and get the latest file, it will fail as it is used by another process.

If you have access to the server, then open the taskmanager -> process and close all the iexplorer.exe/cmd.exe process from other users. Hopefully that will fix it.

Isaiah4110
  • 9,855
  • 1
  • 40
  • 56