Archive

Posts Tagged ‘Silverlight’

Building Silverlight Projects with Automated Team Builds: XAP Issues

June 25th, 2009 No comments

We recently added a Silverlight project to a web application. When we would build the solution locally, it worked great! However, when we would check-in to the Team Foundation Server (TFS 2008), the automated builds were breaking with an error like this one:

"error MSB3021: Unable to copy file "BLA-BLA-BLA\Silverlight.xap" to
"BLA-BLA-BLA\ClientBin\Silverlight.xap".
Could not find a part of the path 'BLA-BLA-BLA\Silverlight.xap'.

We decided to remove the .xap file from source control to avoid the broken builds.  Not a very elegant solution, eh?

While digging around the net today, I found an article that saved the day. Thanks Corvalius! Here is the solution I implemented to resolve the problem:

  1. Open Team Explorer as an administrator
  2. In Source Control, navigate to your .xap file(s)
  3. Right-click the file and click on “Properties”
  4. Select the “Security” tab
  5. Select the “Build Services” group and set the “Read” permission to “Deny”
  6. Do the dance of joy

Step 6 is optional, but highly recommended and hard to resist.

UPDATE:

After upgrading to Team Foundation Server / Visual Studio 2010, I ran into an issue where the build agent said that access to the path of my .XAP file was denied.  To fix it, just follow the steps listed above using the new TFS 2010 collection based build group: