Geeks With Blogs

News View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn

Michael Stephenson keeping your feet on premise while your heads in the cloud

Im currently in the process of migrating our many BizTalk projects from MKS source control to TFS.  While we will be using TFS for work item tracking and source control etc we will be continuing to use Cruise Control for continuous integration although im updating this to CCNet 1.5 at the same time.

Ill post a few things as much as a reminder to myself about some of the problems we come across.

Problem

After the first build of our code the next time a build is triggered an error is encountered by the TFS source control block refreshing the source code.

System.IO.IOException: The directory is not empty.

   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
   at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vsts.deleteDirectory(String path)
   at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vsts.GetSource(IIntegrationResult result)
   at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)
   at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)

System.IO.IOException: The directory is not empty. at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive) at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vsts.deleteDirectory(String path) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vsts.GetSource(IIntegrationResult result) at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result) at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
 
 
 
 

Solution

The problem seems to be with a folder called TestLocations which is created by the build process and used along with the file adapter as a way to get messages into BizTalk.  For some reason the source control block when it does a full refresh of the code does not get rid of this folder and then complains thats a problem and fails the build.

Interestingly there are other folders created by the build which are deleted fine.  My assumption is that this if something to do with the file adapter polling the directory.  However note that we have not had this problem with other source control blocks in the past.

To workaround this I have added a prebuild task to the ccnet.config file to delete this folder before the source control block is executed.  See below for example

prebuild> exec>executable>cmd.exe</executable>buildArgs>/c "if exist "C:\<MyCode>\TestLocations" rd /s /q "C:\<MyCode>\TestLocations""</buildArgs>exec> prebuild>

<

Posted on Friday, January 28, 2011 5:30 PM BizTalk Build & Deployment | Back to top


Comments on this post: CCNet TFS Migration - Dealing with left over folders

# re: CCNet TFS Migration - Dealing with left over folders
Requesting Gravatar...
What happened to Japan is likely to happen here in the US. Drills like this is essential to lessen the damage a catastrophe like that one. The probability of a calamity like that happening in the USA is high. - Kyle Thomas Glasser
Left by Kyle Thomas Glasser on Jan 14, 2012 8:42 PM

# re: CCNet TFS Migration - Dealing with left over folders
Requesting Gravatar...
You have a very nice article May 2017 calendar
Left by komal varshney on Feb 14, 2017 10:45 PM

# re: CCNet TFS Migration - Dealing with left over folders
Requesting Gravatar...
You have a nice post and i lied this post April 2017 calendar
March 2017 calendar
Left by komal varshney on Feb 14, 2017 10:46 PM

# re: CCNet TFS Migration - Dealing with left over folders
Requesting Gravatar...
nice and useful blog ups shipping ups pickup locations near me thanks
Left by richa on Apr 19, 2017 5:18 PM

# re: CCNet TFS Migration - Dealing with left over folders
Requesting Gravatar...
Are you looking for UPS Tracking System to Track your parcel so visit website and know all about UPS-United Parcel Service.
Left by Adithi on Sep 13, 2017 6:49 AM

Your comment:
 (will show your gravatar)


Copyright © Michael Stephenson | Powered by: GeeksWithBlogs.net