tags:

views:

97

answers:

1

I am trying to create a new silverlight project, but I cannot tell if it is creating the project under SL2 or SL3. Anyone know if there is a way to tell the difference in the project?

+6  A: 

Open up the .csproj in your text editor, and you'll see an "Import" element near the very end of the file. If you're using Visual Studio, just right-click on the Project, unload it, then you can right-click and edit the actual .csproj file in the editor.

Silverlight 2 projects will have:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" />

And a Silverlight 3 project will point to the v3.0 SDK:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" />
Jeff Wilcox
Spot on. Perfect answer
Ray Booysen
Awesome! Thanks!
Eric P
Bonus note: yup, changing that property in your .csproj may allow you to quickly switch between targeting the build to Silverlight 2 and 3, when you have both SDKs installed on your machine.
Jeff Wilcox