Solution to TFS Build Error - The Silverlight 4 SDK is not installed


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.


13 comments

  1. Thank you! That was a great help.

    ReplyDelete
  2. Great help! thanks!! saved me hours of research ;)

    ReplyDelete
  3. This was the exact solution to my problem building a silverlight solution on visual studio online, thank you!

    ReplyDelete
  4. This just saved me a lot of time trying to diagnose the problem, thanks!

    ReplyDelete
  5. I ran into same error and your clear steps helped me to resolve the issue. Thanks Kunal.

    ReplyDelete
  6. Thanks. This had me scratching my head for a while.

    ReplyDelete
  7. How we will get the Process menu..........?

    ReplyDelete
  8. Thanks, everything works well

    ReplyDelete
  9. Thanks Kunal. It helped me too. I was trying all kind of stuff but not this. Finally I had to google it out.

    ReplyDelete
  10. Dear Kunal.

    My issue came when i tried to install Visual Studio Update 3.
    After the installation, I can't run any new projects, it says i need to install Silverlight SDK 4.
    I tried to go back use my visual studio ultimate 2012 since i was running both but now even my VS ultimate 2012 wont work asking also for Silverlight SDK 4. Can your solution help me ?

    ReplyDelete
    Replies
    1. No. The above will not work. Please install Silverlight 4 SDK. That will work.

      Delete


 
© 2008-2014 Kunal-Chowdhury.com | Designed by Kunal Chowdhury
Back to top