I was trying to automate build for Silverlight project using Team Foundation Server and build was failing with the following error. Copying my.xap file failed. Access to path '..' denied. Digging deep in the build log, I found that this is happening while copying the source files from TFS to the build folder for compilation. Since xap is an output file it is not required during the compilation. I avoided the download/copy of the xap file by denying access to the build agent. The steps are mentioned here .