Share via


Switching from Silverlight 3 Tools to Silverlight 2 Tools

Silverlight 2 projects can't be created with the Silverlight 3 Tools for Visual Studio 2008.  When Visual Studio 2010 is released, you will be able to build both Silverlight 2 and Silverlight 3 with the same IDE.  But for the immediate future, you will need Silverlight 3 Tools to build Silverlight 3 projects and Silverlight 2 Tools to build Silverlight 2 projects.

If you already have Silverlight 2 Tools installed, you can easily upgrade to Silverlight 3 Tools by running the Silverlight 3 installer.  To downgrade from Silverlight 3 to Silverlight 2 tools, you will need to uninstall "Microsoft Silverlight" and "Microsoft Silverlight Tools for Visual Studio 2008" from Add/Remove programs before re-installing Silverlight 2 Tools.

If you plan to switch frequently between Silverlight 2 and Silverlight 3, the utility below should make the process a little faster.

Setup

  1. Download Silverlight_Tools_Util.zip, and unzip
  2. Download the Silverlight 2 Tools and save Silverlight_Tools.exe in the Silverlight_Tools_Util folder
  3. Download the Silverlight 3 Tools and save Silverlight3_Tools.exe in the Silverlight_Tools_Util folder
  4. If you haven’t previously, run Silverlight_Tools.exe to install the Silverlight 2 Tools and SDK
  5. If you haven’t previously, run Silverlight3_Tools.exe to install the Silverlight 3 Tools and SDK
  6. Run Setup_SLTools_Util.bat to generate switching scripts

To install Silverlight 2 Tools for Visual Studio

  1. Close Visual Studio
  2. Run VS_3-to-2.bat

To install Silverlight 3 Tools for Visual Studio

  1. Close Visual Studio
  2. Run VS_2-to-3.bat

To install Silverlight 2 Tools for Visual Web Developer Express

  1. Close Visual Web Developer Express
  2. Run VWDx_3-to-2.bat

To install Silverlight 3 Tools for Visual Web Developer Express

  1. Close Visual Web Developer Express
  2. Run VWDx_2-to-3.bat

To downgrade a project from Silverlight 3 to Silverlight 2

  1. Open the .csproj or vbproj file in a text editor
  2. Change
    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" Condition="" />
    To
    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition="" />

Silverlight_Tools_Util.zip

Comments

  • Anonymous
    March 18, 2009
    Silverlight 3 Tools Beta for Visual Studio 2008 SP1 is now available for download . This installer includes:

  • Anonymous
    March 18, 2009
    With the release of Silverlight 3 Beta, you’ll may want to try out the new features. Unfortunately, Silverlight

  • Anonymous
    March 18, 2009
    Nice work. I will try it soon. But how much time does it cost to switch between environments?

  • Anonymous
    March 19, 2009
    Well, that all depends on how fast your system is.  It will take a couple of minutes.  But, this skips the installation of the patch and the SDK which are the most time consuming parts of the install so it cuts down considerably the install time.  The SDKs can both be installed at the same time so you don't need to reinstall those.  And the patch that ships with the SL3 tools works with the SL2 tools, so no need to reinstall that either.

  • Anonymous
    March 19, 2009
    Will there be any reason to support Silverlight 2 targets within Visual Studio 2010? Why not only the latest SL is to be supported?

  • Anonymous
    March 20, 2009
    Thank you for nice tool!! But, Isn't not "silverlight_UninstallSLTools3B1Vwdx.exe" but "VWDX_SilverlightTools_Setup.exe -u" better? Because Translate Wizard is opened when I open Silverlight 2 Project.

  • Anonymous
    March 20, 2009
    小町えんじぇるです。こんにちは。 前回 はExpression Blend 3 Preview(英語版)をインストールしましたが、今回は、 Silverlight 3 Beta1(日本語版) をインストールしてみたいと思います

  • Anonymous
    March 21, 2009
    @DenisThe motivation in having VS 2010 support multiple versions of Silverlight is to support future versions.  So, when Silverlight 4 is released, you will install the Silverlight 4 SDK and VS 2010 will recognize it and let you target that version.Regarding Silverlight 2 development after SL3 has released, some enterprise developers need to support older versions of the platform if their administrator is slow to do the runtime updates.  

  • Anonymous
    March 21, 2009
    @KogumaThis script will work with the Japanese version of the tools if you download the Japanese installers for Silverlight Tools

  • Anonymous
    March 23, 2009
    Thank you for submitting this cool story - Trackback from DotNetShoutout

  • Anonymous
    March 29, 2009
    Awesome trick...thanks for sharing Amy!  It's working great so far on my machine.

  • Anonymous
    March 29, 2009
    If you’re building Silverlight applications and need to be able to run Silverlight 2 and Silverlight

  • Anonymous
    March 30, 2009
    在同一台机器上同时安装Silverlight2与Silverlight3beta如果你已经开始做Silverlight2的项目,又急于去体验Silverlight3beta。那么请看...

  • Anonymous
    March 30, 2009
    如果你已经开始做Silverlight 2 的项目,又急于去体验Silverlight 3 beta,那么请看看这里。

  • Anonymous
    March 31, 2009
    URL : http://blogs.msdn.com/amyd/archive/2009/03/18/s... I want to start living side-by-side with Sivlerlight

  • Anonymous
    April 05, 2009
    URL : http://wildermuth.com/downloads/Setup_SLTools_U... I've been using Amy Dullard 's great batch file

  • Anonymous
    April 08, 2009
    Thanks Amy!  It works great :)

  • Anonymous
    April 13, 2009
    Interested in getting started with Silverlight 3 but need to keep your development environment available

  • Anonymous
    April 24, 2009
    But when you switch SDKs, can you make it switch the runtime installed in the browser as well? I need to test my SL2 apps in SL2 to see any bugs that may be present in SL2 but fixed in SL3.

  • Anonymous
    May 08, 2009
    The comment has been removed

  • Anonymous
    May 08, 2009
    The comment has been removed

  • Anonymous
    May 13, 2009
    Developing for Silverlight 2 and Silverlight 3

  • Anonymous
    May 28, 2009
    I did as you mentioned, but when i change the import section of the project file, Visual Studio says that this version is not supported ?what have i made wrong ?