Tuesday, February 7, 2012

Microsoft.Silverlight.CSharp.targets was not found

Here is the error that I was mentioning in my previous post.

The imported project "C:\Program Files\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Resolution:

1) If there are multiple build servers, determine which server is being used. You can do this by queueing a new build with Logging Verbosity set to "Diagnostic". This will also show the values of the MSBuild variables.

MSBuildExtensionsPath32 = C:\Program Files (x86)\MSBuild
MSBuildExtensionsPath64 = C:\Program Files\MSBuild
MSBuildExtensionsPath = C:\Program Files (x86)\MSBuild

COMPUTERNAME = <computer name>



2) Check which variable is defined in the project (example line below) and verify if the file exists. Also check if Silverlight 4 SDK is installed in the build server.

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />


3) If the file doesn't exist, install Silverlight 4 SDK in the build server, and that should solve it. Note that the build server doesn't have Visual Studio, and the Silverlight SDK installed without problems.

*joychua97

3 comments:

  1. nic post
    http://mkniit.blogspot.in

    ReplyDelete
  2. T-Shirt for T-Shirt with Titanium Cost: $45.00 | TITaniumArts
    T-Shirt snow peak titanium flask for T-Shirt with Titanium Cost: titanium price $45.00. 2020 ford edge titanium for sale T-Shirt for T-Shirt titanium bracelet with Titanium Cost: $45.00. T-Shirt for T-Shirt with Titanium Cost: $45.00. T-Shirt for T-Shirt with citizen super titanium armor

    ReplyDelete