Wednesday, August 29, 2012

Unable to load Silverlight 3 Project in Visual Studio 2010

Unable to load Silverlight 3 Project in Visual Studio 2010

I've been trying to open a Silverlight 3 solution in Visual Studio 2010, but I've been getting the following error:

Unable to read the project file 'ESM.Visualization.csproj'. C:\Code\ESM\ESM.Visualization\ESM.Visualization.csproj(238,3): The imported project "C:\Program Files(x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on the disk.

I found that I didn't have Silverlight v3.0 but I couldn't find a way to get Silverlight 3.0 on my Visual Studio 2010, especially since I have Silverlight v4.0 already installed.

Answers & Comments...

Answer: 1

You must change your *.csproj file manually.

Open it in any text editor, navigate to the line with the incorrect code (number 238, I suppose) and check that it looks so:

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

Then change these lines, set the content of the second element to "v4.0":

<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion> 
by : vorrtexhttp://stackoverflow.com/users/427225




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog