Click here to Skip to main content
Click here to Skip to main content

Solution: Getting Silverlight to build on Team Build 2010 RC

By , 3 Mar 2010
 

This is SSW’s first time using Team Build 2010 to automatically create a Silverlight application. In the past, the guys have used Cruise Control, but we want to move to a pure TFS 2010 solution. When one of our developers (Allan) added a Silverlight 3 project to the Solution, our build server spat it out.

clip_image001

Figure: Build SSW.SqlDeploy_20100303.8 failed when trying to build a Silverlight application.

Usually the person who broke the build should now be the one responsible for babysitting it until the next person breaks the build. In this case, we had not agreed that as part of our project prep so I think I will need to wait until the retrospective at the end of our current, and first for this project, sprint.

Problem 1: First Time for Silverlight Compile on the Build Server

Because Allan added the first Silverlight 3 application to the solution, the build server hiccupped as only the Silverlight 2 SDK was installed on it and it was a Silverlight 3 project. I have highlighted below where the problem was located. image

Figure: The Silverlight targets file was not found on the build server.

I downloaded and installed the Silverlight 3 SDK from Microsoft, and hoped all would be well.

But the build failed again…

clip_image003

Figure: SSW.SqlDeploy_20100303.10 failed still trying to find targets.

Problem 2: This was Due to the Web Targets not being Installed.

At this point, I got fed up and copied the contents of my local directory “C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0” to the same folder on the build server.

image

Figure: MSBuild could not find the web targets.

But the build failed again…

image

Figure: SSW.SqlDeploy_20100303.11 failed again trying to build Silverlight.

Problem 3: Can't Build Silverlight 3 Projects with MSBuild 64-bit (the Default)

There is a nasty bug in the Silverlight SDK that means that you can't build using the MSBuild 64-bit process. But on a 64-bit OS, the 64-bit MSBuild is used by default… so how to change it.

image

Figure: Why is it saying that the SDK is not installed… oh, a bug.

This is an easy fix, but a hard to find solution. If you Open up your “build process definition” and expand the Advanced tree, you will see that there is an MSBuild Platform option that is set to “Auto”, change this to “X86”.

clip_image005

Figure: You MUST set the MSBuild Platform to X86 to build a Silverlight project.

And the build failed again…

image

Figure: SSW.SqlDeploy_20100304.04 failed again trying to do code analysis.

Note: This was only run 20 or so minutes after the last build, but my build server happens to be in Australia. :)

Problem 4: Can't Run Code Analysis on Build Server

Now I get Code Analysis errors…

image

Figure: Why would I be getting code analysis errors? Could it be that it is not installed?

To fix this one, I just bit the bullet and installed Visual Studio 2010 onto the Build server, and…

clip_image007

Figure: Successful builds give me a warm fuzzy feeling…

Conclusion

The things that should be installed on the build server are:

  • Team Foundation Build Services 2010 or 2008 or 2005
  • Visual Studio 2010/2008/2005
  • Add-ons for TFS or Visual Studio that may be required to execute the build.
<iframe language="javascript1.1" marginwidth="0" marginheight="0" src=""http://ads.geekswithblogs.net/a.aspx?ZoneID=5&Task=Get&PageID=31016&SiteID=1"" frameborder="0" width="1" height="1" target="_blank" href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&Task=Click&Mode=HTML&SiteID=1&PageID=31016" />

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Martin Hinshelwood
Instructor / Trainer Northwest Cadence
United States United States
Member

Martin Hinshelwood is an Senior ALM Consultant at Northwest Cadence, but also a Microsoft Visual Studio ALM MVPs in Washington, US (Formally UK) and has over 9 years experience in the software industry. He is a member of the Visual Studio ALM Rangers and is also a Professional Scrum Trainer. He regularly writes on his Processes, Practices & Tools blog, and speaks often on Scrum, good practices and Visual Studio ALM.

 

Martin aims to provide Strategic and Tactical consulting on successful implementations of new Processes, Practices & Tools within both small and large organisations across the world. These would include, but not be limited to:

 
  • Scrum Mentoring & Training - Scrum Master Training, Scrum Developer Training, Scrum Mentoring, Scrum Coaching
  •  
  • Practice improvements – Requirements (Backlog,Limiting Work In Progress, Relative Complexity, Acceptance Criteria, Planning Poker, User Stories, Use Cases, Visualisation) , Teams (Team Protection, Commitment), Code (Unit Testing, Branching, Continuous Integration, TDD, ), Test (Acceptance Test Driven Development, Automation, ), Release & Configuration (Continuous Delivery, Continuous Deployment)
  •  
  • Visual Studio ALM Implementation, upgrades & Training - Visual Studio, Team Foundation Server, Team Foundation Build & Microsoft Test Manager

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 3 Mar 2010
Article Copyright 2010 by Martin Hinshelwood
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid