Running Silverlight 2 and 3 On Same Machine - Redux!

  • Apr 06, 2009 at 1:47 AM
  • Shawn Wildermuth


Silverlight Logo

I've been using Amy Dullard's great batch file for switching the tools back and forth between Silverlight 2 and Silverlight 3. It works great except that it doesn't change the runtime. And while the Silverlight 3 runtime *should* run any Silverlight 2 code fine, I just don't trust it. So I had to make it better.

I've made a small change in Amy's batch file to uninstall and install the right runtime, but there is a hitch. You need to download the runtimes yourself (as they are downloaded during installation and since Amy's batch is opening up the Setup package, they aren't there).

To use the batch file you'll need to download the file (here) and unzip it into an empty directory.  Into that directory copy the following files:

You can download them by clicking on the links.

If you haven't done so already, run the Silverlight 2 Tools Package and the Silverlight 3 Tools Package.  Finally you can run the Setup_SLTools_Util.bat file that is in the zip file.  This will create new batch files for moving two and from SL2/SL3 for Visual Studio and Visual Web Developer Express.  Please see Amy Dullard's post about it for more information about how the batch files are used:




Gravatar Monday, April 6, 2009

Frankly Shawn, this method of installing and uninstalling sucks. Is the feedback given to Microsoft ? This is like confusing whatever little following Silverlight had, with versioning. As I see Silverlight 3 is atleast a year away if not less. They should have given better alternatives then to uninstall and install through batch files. I have been with Silverlight since 1.0 and won't be giving a look to Silverlight 3 until I can continue my current projects in Silverlight 2.


Shawn Wildermuth Monday, April 6, 2009

This isn't a great solution but it does work. I would guess that in the next release (another Beta with a GoLive probably) that they'll have a better solution for us.


Vitor Canova Wednesday, April 15, 2009

To me appear an error. I've been changed to Silverlight 2 and published a sample in and tryed to open in a notebook with only Silverlight 2. The browser show a message like "you don't have a valid plugin". In Output of VS I saw the compiler target to "c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\mscorlib.dll". Maybe I make a mistake about anything.


Shawn Wildermuth Wednesday, April 15, 2009


Try uninstalling everything but the SDK and then run the version of the batch you need.


Vitor Canova Friday, April 17, 2009

Thank's. I Uninstalled all Silverlight related programs, installed SDK 2 and 3 and ran the bath. It work's great.


Edward Apostol Monday, May 11, 2009

Hi Shawn -

You may also wish to add the following information in order to switch from Blend 2 to 3 and back (its a registry entry switch). You can review the simple registry switch here -

Now I got a switched environment between vs2008+SL2 tools & Blend 2 to vs2008+SL3 & Blend 3, and Back :)

Hope you are doing well.

Edward Apostol
Sr. Instructor, Consultant
New Toronto Group


Shawn Wildermuth Monday, May 11, 2009

Good Info...thanks!

Leave a Comment