MSBuild Command Line Error - Silverlight 4 SDK Not Installed

My MSBuild command line looks like this:

  msbuild e: \ code \ myProject.csproj / p: Configuration = Debug / p: OutputPath = bin / Debug / p: Platform = x86 / p: PlatformTarget = x86 

The project builds fine on my development machine in VS2010, but not with the help of the command above. I am running Win 7 64-bit. I get an error that says that I do not have the Silverlight 4 SDK installed, but I do it. I read a few posts that you should set Platform = x86, but to no avail. Here is the complete error message:

 Microsoft (R) Build Engine Version 4.0.30319.1 [Microsoft .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation 2007. All rights reserved.  Build started 6/8/2010 4:03:38 PM.  Project "E: \ code \ dashboards \ MyProject2010 \ MyProject2010.Web \ MyProject2010 .web.csproj" on node 1 (default targets).  GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output fi les are up-to-date with respect to the input files.  CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with resp ect to the input files.  CopyFilesToOutputDirectory: Copying file from "obj \ Debug \ MyProject.Web.dll" to "bin \ Debug \ MyProject.Web .dll".  MyProject2010.web -> E: \ code \ dashboards \ MyProject2010 \ MyProject2010.Web \ bin \ Debug \ MyProject.Web.dll Copying file from "obj \ Debug \ MyProject.Web.pdb" to "bin \ Debug \ MyProject.Web .pdb ".  Project "E: \ code \ dashboards \ MyProject2010 \ MyProject2010.Web \ MyProject2010 .web.csproj" (1) is building "E: \ code \ dashboards \ MyProject2010 \ MyProject20 10.Client \ MyProject2010.Client.csproj" (2) on node 1 (GetXapOutputFile target (s)).  C: \ Program Files (x86) \ MSBuild \ Microsoft \ Silverlight \ v4.0 \ Microsoft.Silverlight .Common.targets (104.9): error: The Silverlight 4 SDK is not installed.  [E: \ cod e \ dashboards \ MyProject2010 \ MyProject2010.Client \ MyProject2010.Client.cspr oj] Done Building Project "E: \ code \ dashboards \ MyProject2010 \ MyProject2010.Clie nt \ MyProject2010.Client.csproj" (GetXapOutputFile target ( s)) - FAILED.  Done Building Project "E: \ code \ dashboards \ MyProject2010 \ MyProject2010.Web \ MyProject2010.web.csproj" (default targets) - FAILED.  Build FAILED.  "E: \ code \ dashboards \ MyProject2010 \ MyProject2010.Web \ MyProject2010.web.csp roj" (default target) (1) -> "E: \ code \ dashboards \ MyProject2010 \ MyProject2010.Client \ MyProject2010.Clie nt.csproj "(GetXapOutputFile target) (2) -> (GetFrameworkPaths target) -> C: \ Program Files (x86) \ MSBuild \ Microsoft \ Silverlight \ v4.0 \ Microsoft.Silverlig ht.Common.targets (104.9): error : The Silverlight 4 SDK is not installed.  [E: \ c ode \ dashboards \ MyProject2010 \ MyProject2010.Client \ MyProject2010.Client.cs proj] 0 Warning (s) 1 Error (s) Time Elapsed 00: 00: 00.39 

I appreciate any help. Thank.

+36
silverlight msbuild
Jun 08 '10 at 20:37
source share
7 answers

I realized this - in MSBuild there is a setting where you can choose the x64 or x86 environment for MSBuild (on the same page where you set the MSBuild flags) - install it on x86 , and everything will work.

+23
May 8 '11 at 4:55
source share

If you came here because of a problem with tfs2010 , causing the above error (even if you installed the Silverlight 4 SDK), then to achieve the same fix you must edit the process build template:

Go to the "Process" tab, expand the "3.Advanced" section and find the second lower setting ("MSBuild Platform") and install it in X86, which then prompts the build agent to use the x86 MSBuild option.

This solved my problem in combination with Paul Betz's answer above.

+21
Feb 12 2018-12-12T00:
source share

I encountered the same problem at startup: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe

Just run:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe

+19
Jan 16 '12 at 17:07
source share

The start message says that you must install the target platform on X86, but this is not a solution for the build server.

Your build configuration file has the option to install the MSBuild platform for X86. This parameter can be found through: Process β†’ 3.Advanced β†’ MSBuild platform (automatic is installed by default)

The problem with bedding is that Silverlight does not support the 64-bit version.

I found this solution that works for me on: http://social.msdn.microsoft.com/Forums/en/msbuild/thread/20a742a1-b99c-4638-8590-9a9d6a95fb69

+4
Dec 05 '11 at 13:12
source share

I had this problem in the Windows 7 Ultimate 64 bit when trying to configure the Windows 7 Phone SDK. No SDK / Toolkit installation / repair combination was designed for me, so I decided to explore a little further.

Having placed several <Message /> build tasks in the Microsoft.Silverlight.Common.targets file, I found that I did not have a registry entry in Software \ Microsoft \ Silverlight \ 4.0. This was true for both the 32-bit section and the Wow6432Node section.

Thus, the outputs of several assembly targets that detect where the frameworks are stored return spaces, with the result that the number of lines down ends with a number of other targets. In particular, the _FullFrameworkReferenceAssemblyPaths and TargetFrameworkDirectory properties were not set properly.

Despite the fact that I am completely anathema to all recommendations, I circumvented this problem by manually copying the values ​​to the .targets file, for example:

 <PropertyGroup> <_FullFrameworkReferenceAssemblyPaths>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0</_FullFrameworkReferenceAssemblyPaths> <TargetFrameworkDirectory>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone</TargetFrameworkDirectory> </PropertyGroup> 

Not what I am especially proud of, but it is necessary if I am going to make some progress in development. Hope this helps someone else.

+2
Jun 13 '10 at 22:18
source share

If setting up build on X86 and reinstalling Silverlight SDK 4 did not help: If you are using VS2013 on the build server, check if the Windows Phone SDK is installed. I needed to run the VS2013 installer, click the "Change" button and install the Windows phone sdk.

Or try installing Windows Phone sdk to be able to create solutions for Windows phones.

0
Aug 18 '14 at 2:52
source share

I had the same problem using TeamCity. My build step was an MSBuild action that was installed on x64. As soon as I changed it to x86, it worked. :)

0
Dec 20 '17 at 14:34
source share



All Articles