none
Building Silverlight Project using MSBuild.exe

    Question

  • I am getting the following build error when attempting to build a silverlight project using MSBUILD.EXE, using the command line "msbuild.exe solutionfile.sln"

    "The Silverlight 4 SDK is not installed. [c:\devjup\prj.csproj]"

    However, the Silverlight SDK is, in fact, installed.  Also, when the project is built within the VS 2010 environment, it builds without error. 

    In addition, we have a VS 2008 / Silverlight 3 version of this project, which builds without error inside of the VS 2008 environment, but it also gets a similar error when attemting to build from the command line.  In that case, the error is "The Silverlight 3 SDK is not installed".

    It appears that there is an environment variable missing, or something.  I cannot find the answer however.  Any assistance would be appreciated.

    Thank You.

    Thursday, July 15, 2010 8:21 PM

Answers

  • Hello,

    It looks like you attempt to build a Silverlight project with 64-bit MSBuild.  If so, Silverlight DOES NOT support x64 platforms. And Silverlight projects cannot be built by 64-bit MSBuild.

    As a workaround, you must use the 32-bit MSBuild and target x86 or AnyCPU platforms to build your Silverlight projects. For more information, please check Visual Studio Blog document:

    Building on Cross targeting scenarios and 64-bit MSBuild

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by scc.rickm Friday, July 16, 2010 5:07 PM
    Friday, July 16, 2010 4:00 AM

All replies

  • Hello,

    It looks like you attempt to build a Silverlight project with 64-bit MSBuild.  If so, Silverlight DOES NOT support x64 platforms. And Silverlight projects cannot be built by 64-bit MSBuild.

    As a workaround, you must use the 32-bit MSBuild and target x86 or AnyCPU platforms to build your Silverlight projects. For more information, please check Visual Studio Blog document:

    Building on Cross targeting scenarios and 64-bit MSBuild

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by scc.rickm Friday, July 16, 2010 5:07 PM
    Friday, July 16, 2010 4:00 AM
  • After experiencing the exact same issue, I switched from using the version of msbuild at c:\windows\Microsoft.net\Framework64... to the version at c:\windows\Microsoft.net\Framework (no 64) and things compiled fine. 
    Monday, August 23, 2010 6:31 PM