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

2

6

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?

Banff answered 3/1, 2013 at 17:41 Comment(1)
Worth noting that I encountered a similar error when using RIA Services with Silverlight. The generated client domain classes were still locked when the build service tried to compile the Silverlight application.Lancinate
B
4

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

Banff answered 4/2, 2013 at 23:52 Comment(2)
I'm having the same issue, but MSBuild Multi-Proc is already set to False. Any more insights?Kyanite
I dont have any insight as I have not had any more problems with this. There are so many variables that go into making a build, I suggest you ask you own question and put a link to it here in the comments. I will give it a try but I am no TFS guruBanff
V
6

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

See:

Visual answered 16/4, 2014 at 12:19 Comment(0)
B
4

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

Banff answered 4/2, 2013 at 23:52 Comment(2)
I'm having the same issue, but MSBuild Multi-Proc is already set to False. Any more insights?Kyanite
I dont have any insight as I have not had any more problems with this. There are so many variables that go into making a build, I suggest you ask you own question and put a link to it here in the comments. I will give it a try but I am no TFS guruBanff

© 2022 - 2024 — McMap. All rights reserved.