views:

40

answers:

2

Hi,

Now that I have installed Silverlight 3, I seem unable to build a Silverlight application for Silverlight 2.

I have set my objects minRuntimeVersion to 2.0.31005.0, however users who do not have silverlight 3 are still prompted to update.

I'd prefer not to force this update on my users just yet, so is there a way to build Silverlight for version 2 only?

I am using Vistual Studio and have installed the silverlight_tools that came out with version 3.
Previously I had silverlight_tools from version 2 and simply installed the new version over this.

+1  A: 

A DULLARD'S GUIDE: Switching from SilverLight 3 to SilverLight 2 tools seems to have an, all be in not too nice, answer. But it should allow you to achieve your goal of building both SilverLigh 3 and 2 apps on the same machine.

FryHard
A: 

I would recommend instead installing both Silverlight 2 and Silverlight 3 SDKs, and instead of having to mess with uninstall/installing the tools all the time, just build for both, and select a primary development environment (probably Silverlight 3).

I wrote up a guide on building for both on the same machine back in March. This is how we setup our automated build lab to build the Silverlight Toolkit every day for multiple releases.

This involves setting the SilverlightRuntimeVersion, TargetFrameworkSDKDirectory, and TargetFrameworkDirectory MSBuild properties when building.

You can set the three properties in your project files, using MSBuild tricks (what my post was suggesting), or just at the command prompt/build-time, you can add those properties and point them to the appropriate values.

Jeff Wilcox

related questions