Coding Blog

Jim Scott's coding blog

Visual Studio - CloudService app "Build fails" Unable to remove directory.

While working on a CloudService application for Windows Azure, I encountered an error saying "Unable to remove directory "C:\HelloAzure\HelloAzure_WebRole\bin\_PublishedWebsites". The directory is not empty.

My version of Visual Studio is 2008 SP1, althopugh I assume the issue may be with other versions as well. The error occurs most every time I build, rebuild or publish.

I've attached a sample of the error below, note the WebRole\bin\_PublishedWebsites directory was the only location affected and was consistent across all projects receiving the error.

This looks to be as the result of the Microsoft.CloudService.targets calls for the cleanup of the _PublishedWebsites folder after the Webrole is compiled and it added to the .cspkg file. 

 

 In the end the issue was related to MS Forefront endpoint detection (antivirus), after adding devenv.exe to the excluded processes list the error was immediately resolved.  

Cheers,

John

 

Posted: Jan 17 2010, 02:10 by john.scott | Comments (1) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: .net | Azure | c# | Coding

Comments

nick United Kingdom said:

nickyes.  works for me too.

# January 21 2010, 06:38

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading