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
2009-08-02 17:43:22
Spot on. Perfect answer
Ray Booysen
2009-08-02 18:05:11
Awesome! Thanks!
Eric P
2009-08-02 20:51:51
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
2009-08-05 21:05:05