Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

visual studio 2010 - Silverlight 4: Resolving Microsoft.Silverlight.CSharp.targets was not found?

I've been upgrading some Silverlight 3 apps to Silverlight 4 in Visual Studio 2010. My Silverlight 3 apps open fine in Visual Studio, but SL4 apps don't, with the following error:

C:PathToMyProject.csproj : error : Unable to read the project file 'XNTVOD.AdminClient.csproj'. C:PathToMyProject.csproj(593,3): The imported project "C:Program Files (x86)MSBuildMicrosoftSilverlightv4.0Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

I had a problem with older VS Silverlight components and recently uninstalled most of the SL components, and right now in Add/Remove programs I have:

  1. Microsoft Silverlight
  2. Microsoft Silverlight 3 SDK
  3. Microsoft Silverlight 4 Toolkit April 2010

The <import> declaration looks like this for the SL4 project:

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

That folder, C:Program Files (x86)MSBuildMicrosoftSilverlightv4.0 only has two files in it:

Microsoft.Ria.Client.targets

Microsoft.Ria.Client.VisualStudio.targets

What Silverlight development component am I missing in particular? I see a bunch of different options, from Silverlight 4 SDK Beta to VS Tools for Silverlight 4 and a bunch of others. I don't want to install stuff that will get me right back to the situation I had before this one with outdated components.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looks like this is the missing piece...

Silverlight 4 Tools for Visual Studio 2010


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...