Switching Your Visual Studio Environment Between Silverlight 2 and Silverlight 3

With the release of Silverlight 3 Beta, you’ll may want to try out the new features.  Unfortunately, Silverlight 3 Beta is a developer only release (no end-user runtime, no GoLive license), so you might end up going back and forth.  Even more unfortunate is that Visual Studio 2008 doesn’t have much room to create a multi-targeting environment for developers, so you’ll have to switch between which packages are installed.

To upgrade from Silverlight 2 to Silverlight 3, simply run the new installer (found here).  It will automatically remove the Silverlight 2 Tools for VS package, which is incompatible with the Silverlight 3 package, and then install the new packages you’ll need for Silverlight 3 development.  (Note: If you’re looking to take advantage of the binary encoding for WCF services now available in Silverlight 3, you’ll have to remove the Silverlight 2 SDK manually; see here for more info.)

To downgrade from Silverlight 3 to Silverlight 2, there’s a couple extra steps required.  The Silverlight 2 installer doesn’t know to check for the Silverlight 3 packages, so you’ll have to remove them by hand.  This can be done through the Add/Remove Programs applet in the Control Panel.  The packages which need to be removed are:

  1. Microsoft Silverlight 3 Tools for Visual Studio/Visual Web Developer (this needs to be removed because the Silverlight Tools packages are incompatible; if both are installed, VS/VWD will use the Silverlight 3 version)
  2. Microsoft Silverlight (the version 3 runtime causes the Silverlight 2 Tools installer to fail; we’re working on a solution)

After that, run the Silverlight 2 Tools installer again (found here).

To make this easier, Amy Dullard (one of our team members) has put together some scripts to automate this process.  See her blog post here for more info.