Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS build Xap packaging failed because it is being used by another process

I am responsible over managing our automated builds and recently we have moved two silverlight based web applications into the same solution. Now about half the time when we build through the build server the build fails randomly with one of the two xap files with the following error message.

Xap packaging failed. The process cannot access the file 'G:\Builds\2\Application Suite\Main\Binaries\silverlight app1.xap' because it is being used by another process.

The structure is as follows:

web app1 BUILDS silverlight app1

web app2 BUILDS silverlight app2

Can some one help me solve this issue it is causing me quite a headache?

like image 903
Ben Anderson Avatar asked Jan 03 '13 17:01

Ben Anderson


2 Answers

For TFS 2013, where MSBuild Multi-Proc parameter is no longer present, try to set MSBuild Arguments to /m:1

See:

  • http://msdn.microsoft.com/en-us/library/bb651793.aspx
  • http://social.msdn.microsoft.com/Forums/vstudio/en-US/0b856b65-37de-4256-8a09-e233911985f1/tfs2013-msbuild-problems-with-parallel-build?forum=tfsbuild
like image 164
gius Avatar answered Sep 22 '22 19:09

gius


It turns out that I had to change the tfs build settings for msbuild to build each of the projects one at a time.

Here are the steps to take:
Goto builds -> Edit Build Definition -> Process Tab -> Edit "MSBuild Multi-Proc" to False

Screen shot of TFS Build

Not the best solution as it slows the total build process down because the projects cannot build in parallel but it worked

like image 31
Ben Anderson Avatar answered Sep 23 '22 19:09

Ben Anderson