Follow us on X (Twitter)  Like us on Facebook  Connect with us on LinkedIn  Subscribe to our YouTube Channel  Subscribe to our WhatsApp Group

Today while creating my first CI Build definition in the Visual Studio Team Foundation Server, I noticed that, though the Silverlight 5 SDK is installed in the server, I was unable to run the build. It was throwing an error message that says “The Silverlight 4 SDK is not installed”.

 

The issue was not actually with the Silverlight SDK and I found the solution after lots of analysis. In this post, I am going to share it so that, if you come across the same issue, it will be helpful.

 

Build Issue

I was actually trying to create a build definition to do automated build on each code check-in named as CI build (Continuous Integration) for one of my Silverlight project. When I triggered the build for the first time, I noticed that the build failed as it was unable to detect Silverlight 4 SDK in the server.

 

The Team Foundation Server (TFS) was recently upgraded to TFS 2012 from the TFS 2010 version and the Silverlight 5 SDK was installed earlier prior to TFS 2012 upgrade. So, I repaired the installation of Silverlight SDK.

 

I was in hope that, this time it will work but alas, it did not. I was getting the same issue. We already know that Silverlight 5 SDK comes with Silverlight 4 SDK, right? Then why it is asking me to install the Silverlight 4 version on top of version 5? That was not understandable to me.

 

Error Message

The automated build for the Silverlight project was failing in the server with the following message: “C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.Common.Targets (104): The Silverlight 4 SDK is not installed”.

 

Here is the screenshot of the failed build activity log:

 

TFS Build Error - The Silverlight 4 SDK is not installed (www.kunal-chowdhury.com)

 

Problem Statement

I am not a TFS Administrator, I am just a developer. So, the issue was not known to me. I started querying online technical documents and later came to know that it was not due to Silverlight SDK installation but a small configuration issue in the build definition that I created.

 

By default, the build definition creates under the “MSBuild Platform” as “Auto” but for the Silverlight projects, it needs to be specified explicitly as “x86” platform, otherwise it will not build.

 

To resolve this issue, you need to open the build definition (you must be a build administrator), navigate to “Process” tab and set “X86” as the “MSBuild Platform” as shown below:

 

TFS Build Error - x86 MS Build Platform (www.kunal-chowdhury.com)

 

That’s all. The build will now complete successfully if triggered manually or automatically. If you faced the same issue, just follow the above solution which will work for you. For your reference, I am just pointing the positive solutions in this case:

    1. First check whether the latest Silverlight SDK is already installed in your server.
    2. If you installed Team Foundation Server after installing the Silverlight SDK, you have to re-run the SDK installation.
    3. Edit the build definition and check whether the MSBuild Platform is set to x86 as Silverlight projects needs to be build against the targeted platform version only.

Did it solve the problem that you faced? If so, don’t forget to drop a line below saying how this helped you. This will energized me to write more posts on the same topic. If you know some other trick to resolve the same issue, let me know. I will validate it and add it in this post which will help others if they face similar ones in future.

 

Subscribe to my blog’s RSS Feed and email newsletter. Do you know that, I am available on Twitter, Facebook and Google+? Connect with me for technical updates and any online discussions.

Have a question? Or, a comment? Let's Discuss it below...

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.