Advertisement

Check your Silverlight 2 apps for compatibility with Silverlight 3

One of the goals of new versions of Silverlight is to be be backward compatible with previous versions.  We make this a priority goal so that people can keep their previous applications deployed while not worrying that people with newer Silverlight will have a broken experience.

Silverlight 3 has been out in beta form since March 2009 and hopefully if you are a Silverlight developer you’ve had a chance to work with the new features and tools.  If you have existing Silverlight 2 applications that are deployed, I wanted to draw your attention to some action items if you haven’t done them already.

Call to action: Test your Silverlight 2 applications for compatibility!

What does this mean?  Well, we want your existing applications to be successful and want to ensure their compatible.  Here’s you’re call to action:

  • Keep your Silverlight 2 applications deployed.
  • Set up some test “user” machines to browse to those applications.  Install either the Windows or Mac runtime of SL3 beta respectively (ideally both if you have access to both operating systems)
  • On the test machines start browsing and working with your Silverlight 2 applications…test your normal scenarios
  • If you find issues, report them immediately to the forums with repro steps and as much detail as you can.  Might I suggest making the topic SL2Compat: <your issue> so as an example: SL2Compat: my app stopped calling web services.

As I mentioned, our goal is backward compatibility, so hopefully your applications will be unaffected.  As you might expect there will be breaking changes among Silverlight 3 beta to release as well as some fixes in Silverlight 3 that we’ve found needed to be fixed.  How will these fixes potentially affect your applications?  Hopefully very little due to quirks mode.

A word on quirks mode

The Silverlight team wanted to fix some things in Silverlight 2 in the new version of the runtime, Silverlight 3.  However by fixing some of these things it was possible to change behavior of existing Silverlight 2 applications.  In order to get around this, we made these potentially problematic changes “quirk mode changes.”  A quirk mode change is one that the Silverlight 3 runtime will not enforce if the runtime detects that the application being run was designed for Silverlight 2.

The runtime detects which target version by the RuntimeVersion attribute in the application’s AppManifest.xml file.  If you’ve never modified it, that’s fine.  The Silverlight build tools automatically append the correct runtime version into this file at compile time.  So if you are working with Silverlight 2 release tools, the attribute is 2.0.31005.0.  If you work with Silverlight 3 tools, it will be the Silverlight 3 version number.  The bottom line here is that your Silverlight 2 compiled apps will still run under Silverlight 3 without modification – quirks mode happens automatically.

What happens at Silverlight 3 release?

Nothing.  If your Silverlight 2 applications work under the SL3 runtime, which they should, then you are fine.  You may want to take advantage of the many new features of Silverlight 3.  At the time when you do this, you will be working in Silverlight 3 and anything that may have been fixed from Silverlight 2 will now be affected (see quirks mode diagram above). 

When you do update your Silverlight application to use version 3 and redeploy the XAP, make sure that you also update your deployment mechanism (i.e., the <object> tag or the Javascript method to create the Silverlight object).  You’ll want to ensure you update the new minRuntimeVersion attribute to the Silverlight 3 ones to ensure the end-user has the correct version.

If you have a Silverlight 2 application, we encourage you to ensure you’ve done your compat testing.  If you find issues, report them in the forums, not here.

Hope this helps!  Onward to Silverlight 3!


This work is licensed under a Creative Commons Attribution By license.

  1. 6/5/2009 6:01 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    "A quirk mode change is one that the Silverlight 3 runtime will not enforce if the runtime detects that the application being run was designed for Silverlight 2."

    What if I have one (older) class library that is compiled for SL2. I then use this library in an application that I compile for SL3. Will the runtime be able to distinguish that half the app should run in quirks mode and the other should not?
    If not, is there a list of issues we can get that shows us what to avoid in the SL2 class library, so this use case will work?
  2. 6/5/2009 7:15 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
  3. 6/5/2009 8:06 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Kiran -- in Microsoft-speak a 'launch' is different than 'release'
  4. 6/5/2009 8:20 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Damn, I knew it was too early to get excited!!
  5. 6/5/2009 9:08 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Kiran -- in Microsoft-speak a 'launch' is different than 'release'

    Hi Tim,

    Without committing to a 'release', it would be nice if you guys could resolve the ambiguity as to what we'll be seeing on the 10th.

    As for the quirks mode, can you provide any details on what that covers? For instance, right now you set Canvas.ZIndex for Grids, which was a bug in the Silverlight 2 betas. In the Silverlight 3 beta I noticed this still hadn't been fixed (probably for compatability reasons.)
  6. 6/5/2009 11:54 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Morten - quirks mode is applied at the app (XAP) level. So even if you add a reference to an SL2 binary, your SL3 XAP will still be decorated with RuntimeVersion=3 and thus follow v3 behavior.

    Jack - we will have a full breaking changes document from SL3 beta to release which also covers the quirks mode areas that developers should know about. As to what the event on the 10th is about, it is a marketing event that is an opportunity for us to showcase the great work that some of our customers and partners have been working on with the new platform as well as the great features in the latest releases.
  7. 6/6/2009 11:43 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Hi Tim,

    From your answers I deduce that SL3 will not be released on the 10th of July. Can you tell us whether a "go-live" license will be available for SL3 beta in the near future?
  8. 6/6/2009 11:53 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Emiel -- we haven't announced any release dates for Silverlight or the associated tools. We will not be having another beta with go-live licensing at this point though.
  9. 6/6/2009 10:47 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Thanks for the answer. That's what I was afraid of. As a control developer, how do I make sure that my SL2 class library works well for our customers who want to use it in an SL3 application?
    That was why I was asking for a list of "breaking" changes, so we can properly test whether our SL2 class library will hit those quirks when deployed as a SL3 app.
  10. 6/7/2009 8:49 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Morten -- the best test for that now would be to treat your SL2 class library as an 'app' and do the compat test yourself. Fork it and compile it into an SL3 app and run your tests against the APIs for that assembly.
  11. 6/8/2009 11:52 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    It would still be a lot easier if you would give us a list of breaking changes so we can target our testing on those issue. Our APIs are large, and we want to make sure we can fully support SL3 as soon as it hits the market.

    Are you seriously saying that we cannot get a list of >breaking< changes?

    --
    Quirks mode... *sigh* it's IE all over again... :-)
  12. 6/8/2009 12:06 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Morten -- your SL2 apps will run fine under SL3 runtimes--that is the backward compat goal. If you are seeing that they *aren't* -- please alert us. Once we release with SL3 with information about breaking changes from SL3 Beta to release as well as documenting which things are considered quirks mode. We have not finalized that complete documentation and aren't ready to release it yet. I don't like the name of quirks mode either, but I believe it is a better alternative than telling people that their SL2 apps 'may not work' -- versus providing the fallback behavior.
  13. 6/8/2009 2:13 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Please call it anything but quirks mode (if simply to prevent Bing searches colliding with IE's quirks mode)

    http://thesaurus.reference.com/browse/quirk

    How about 'foible mode'?
  14. 6/8/2009 4:43 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Tim you are misunderstanding. I'm not talking about SL2 >apps<, but SL2 >libraries< that run as part of a SL3 app.

    To quote yourself: "if you add a reference to an SL2 binary, your SL3 XAP will still be decorated with RuntimeVersion=3 and thus follow v3 behavior".

    As a component developer, this is the part that really worries me.
  15. 6/9/2009 9:44 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Morten -- gotcha. Yes as I mentioned the app will be treated as SL3 proper then. I assume you're looking for 'what should I be looking out for then' information. One thing that you should do now is test that scenario with your component and your use cases...if you find issues, let us know. We are just not ready with our complete breaking changes documentation at this point to release it.
  16. 6/12/2009 1:51 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    OK thanks, that I can understand (that you are not ready yet). As long as you make sure that list will be publicly available. Luckily I was able to get the early draft list through the backchannels instead, but not everyone is lucky enough to have that option.
  17. 6/12/2009 2:08 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Morten it will absolutely be made available in the release SDK.
  18. 6/15/2009 1:17 AM | # Re:
    To catch up with the speed of Microsoft is very hard, after upgrade our framework/version, there are lots of work to do.
  19. Gravatar
    6/16/2009 9:01 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Tim,
    Please see this link: blogs.msdn.com/.../expression-web-3.aspx

    "Tom, Silverlight 3 and Expression Studio 3 will be available this summer. When they're available, you'll see the news here.

    Polita Paulus

    Developer Division

    Microsoft"


    Any hints if Silverlight 3 is going to be released this summer after July 10th and hopefully before September?
  20. 6/16/2009 12:48 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    I think I found a bug where if you upgrade your SL2 app to SL3 beta, then you implement RIA, it doesn't work correctly. It generates the proxy code in the SL project but when you go to call a method, it doesn't actually call the associated domain service method, yet it doesn't throw any exceptions. The same exact code works ok if you create a new SL3 beta project. Has anyone else seen this behavior, or alternately, upgraded a project and then been able to use RIA?
  21. 6/17/2009 4:35 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Hi Tim,
    thanks for the good post.
    I was wondering if SL2 compiled Xap will be able to use GPU acceleration in Silverlight 3 runtime?

    thanks,
    Manu
  22. 6/17/2009 8:26 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Manu -- not really, because your compiled code wouldn't have the CacheMode settings in various areas for it.
  23. 6/21/2009 9:44 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Hi Tim,
    thanks..
    yes I almost knew it.. I just wondered if the quirk mode supported that in someway ;-)
    One more question I had..
    Is there a Linux support for Silverlight 3?
    (I guess we have it for Silverlight 2 - Moonlight?)
    And can you provide me with some pointers where I can load a SL3 Xap if SL 3 plugin is available, and if not then load a SL2 Xap. Basically I want to have 2 Xaps (2 & 3) and load either 2 or 3 depending on the plugin available. I dont want to force the user to download 3 (or e.g. Linux Users)

    Thanks in Advance,
    Manu
  24. 6/29/2009 5:49 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Tim,

    if I understand correctly you are talking about SL3 deployed on the client and running an SL2 application (.xap).

    However, the object tag on the thml page uses "application/x-silverlight-2"; does that imply that the SL3 registers itself as handler for SL2 applications?
    Is it possible to have SL2 _and_ SL3 deployed on the client and will the respective runtime be used, based on the mime type?

    Thanks,
    Alexander
  25. Gravatar
    6/30/2009 10:11 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Tim,

    what about clients havin already a SL2 plugin installed - installing the SL3 plugin meens actually upgrading the SL2 plugin or both plugins can coexist on the client?
  26. 6/30/2009 10:31 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    CGR - no only one version of the plugin can exist at one time right now. Users installing SL3 plugin will have the SL3 plugin running whenever they hit Silverlight-enabled applications/sites.
  27. Gravatar
    6/30/2009 10:36 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Tim,

    that means that the SL3 plugin will be triggered whenever a Silverlight-enebled application/site is being accessed, regardless of the Silverlight version that application/site was developed on?
  28. 6/30/2009 10:49 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    CGR - that is correct. If I have the SL3 plugin and visit an SL1.0 site, the SL3 plugin is being used to render the application. The developer of the silverlight application specifies in the object instantiation what the *minimum* runtime version required is.
  29. 6/30/2009 11:49 PM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    kabin üretimi yapım ve satış firmasıyız.
  30. 7/2/2009 8:46 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3

    CGR - that is correct. If I have the SL3 plugin and visit an SL1.0 site, the SL3 plugin is being used to render the application. The developer of the silverlight application specifies in the object instantiation what the *minimum* runtime version required is.
  31. 7/2/2009 8:47 AM | # 
    When you do update your Silverlight application to use version 3 and redeploy the XAP, make sure that you also update your deployment mechanism (i.e., the <object> tag or the Javascript method to
  32. 7/2/2009 8:51 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    To quote yourself: "if you add a reference to an SL2 binary, your SL3 XAP will still be decorated with RuntimeVersion=3 and thus follow v3 behavior".
  33. 7/9/2009 11:41 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    It's heeereeeee. But I can't insert my sl2 project in vs tools 3 :(
  34. 9/30/2009 2:47 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    Hi,

    I have an application that was initially designed for SL2. The application is full of charts (used ComponentOne charts). Now, the application is converted in SL3. Charts are working very slow in SL3 as compare to SL2. Let me tell you. I have used MVVM pattern, so everything is working through binding properties.

    I really appreciate if anybody can put some light on this.
  35. 10/27/2009 3:54 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    However, the object tag on the thml page uses "application/x-silverlight-2"; does that imply that the SL3 registers itself as handler for SL2 applications?
    Is it possible to have SL2 _and_ SL3 deployed on the client and will the respective runtime be used, based on the mime type?
  36. 10/27/2009 7:55 AM | # re: Check your Silverlight 2 apps for compatibility with Silverlight 3
    tatil - a user can have only one version of the plugin installed. The mime type in the object tag does NOT represent the version of the runtime, but rather the version of the <object> tag implementation. Both Silverlight 2 and 3 use the x-silverlight-2 taxonomy. The version of the runtime required is dictated by the use of the minRuntimeVersion parameter you set on the <object> params.

 
Please add 3 and 4 and type the answer here:
First time here? You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting! (hide this)