This blog is subject the DISCLAIMER below.

Monday, January 17, 2011

How to solve "Silverlight.CSharp.targets was not found" problem


Friend of mine asked that she can't build any Silverlight project inside VS 2010 from http://gallery.expression.microsoft.com.
The error was similar to : 
C:\OverlappingTabs.csproj : error  : Unable to read the project file 'OverlappingTabs.csproj'.
C:\OverlappingTabs.csproj(108,3): The imported project "C:\Program Files\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

This problem runs because VS2010 came up with support for Silverlight 3 but not Silverlight 4 as Silverlight 4 had released after VS2010.

What you need is just setup "Microsoft Silverlight 4 Tools for Visual Studio 2010" about 35 MB without restarting your OS.



2 comments:

Anonymous said...

Thank you very much - Ani

Manoj Kumar said...

nic post
http://mkniit.blogspot.in