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!

Each release of Silverlight it is the goal to make sure existing Silverlight applications continue to work.  Since I think what this means causes some confusion I’m going to do my best to explain what we mean by this.

Silverlight 3 application working with Silverlight 4

Okay, scenario 1 is I have a Silverlight 3 application (XAP), will that still work as-is in Silverlight 4? 

Yes, this is the situation we refer to as backward compatibility.  What this means is that existing compiled XAPs under previous versions should continue to work as-is even if your users have a later version of Silverlight installed on their machine. 

An example would be someone like Netflix.  If you are already a Netflix instant watch user with their Silverlight application, then you’ve been watching movies fine on your computer for a while.  If you go and download Silverlight 4 today, this should not change, even though their player is Silverlight 3.  From the docs:

The Silverlight team wanted to fix a number of Silverlight 3 bugs in Silverlight 4. However, by fixing some of these bugs, it is possible that some existing Silverlight 3 applications would break. In order to avoid this, the Silverlight team addressed these potentially problematic changes by creating a "quirks mode" for runtime behavior. A quirks mode change is a case where the Silverlight 4 runtime will branch its behavior if the runtime detects that the application is targeting Silverlight 3. In this way, Silverlight 4 is made "bug compatible" as a runtime. However, the noted quirks mode behavior may need to be revisited if you recompile your application for Silverlight 4.

The above scenario (previous version Silverlight apps running under their version mode) is often referred to as “quirks mode.”

Silverlight 3 CODE recompiled as Silverlight 4 app

Next scenario is I opened my Silverlight 3 code project and compiled as Silverlight 4 and now it doesn’t work!?  You said backward compatible!!!

This is where breaking changes come into play.  Breaking changes range from anything from security fixes to bug fixes to correcting behavior that we wanted to change.  We try at all costs to avoid breaking changes, but sometimes they are unavoidable to progress and make things right.  When we can’t avoid them, we do our best to ensure that quirks mode (described above) works as customers expect.

For Silverlight 4, there are some breaking changes from 3->4 that developers should be aware of.  These are all documented on MSDN here.  Here is a point list of a few of them:

  • XAML Parsing AmbiguousMatchException when application property conflicts with new Silverlight 4 property
  • Toggling full screen mode reruns hit testing
  • Shared BitmapImage resources
  • DRM on cients with FAT32

The document explains the scenarios as well as what to do, if applicable. 

Hopefully this helps understand a few things.  If you find that your compiled Silverlight 3 XAP is not running correctly when rendered in a Silverlight 4 plugin environment, please let us know on the forums with as much detail as possible (i.e., “it doesn’t work” isn’t enough).

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

4/15/2010 3:05 PM | # re: Backward Compatibility with Silverlight 4 applications
Hi, what happens when an existing compiled Silverlight 3 library is referenced from a new Silverlight 4 xap? This appears to work fine but is it an officially supported scenario?
4/15/2010 11:09 PM | # re: Backward Compatibility with Silverlight 4 applications
Morten/Anonymous Coward -- actually that's the code scenario (maybe I should explain it better). The backward compatibility is at the XAP level, not the assembly level. If you reference an SL3 assembly in an SL4 app, it's running as SL4 (no quirks mode).

Compat at the XAP is the best way to think about it.
4/16/2010 8:27 PM | # re: Backward Compatibility with Silverlight 4 applications
So just to confirm, using SL3 libraries from SL4 is supported and should work fine? They just run in whatever mode the XAP is compiled to? Thanks for the info!
4/20/2010 5:05 AM | # re: Backward Compatibility with Silverlight 4 applications
Possibly a silly question, but will installing just the SL4 runtime on my dev machine prevent me to continue to work on SL3 apps with VS 2008? I will not upgrade VS, SL Tools for VS or SL Toolkit YET. Still, I'd like to use websites or demos done with SL4 today. That's why I would install just the runtime. Thanks!
4/20/2010 7:15 AM | # re: Backward Compatibility with Silverlight 4 applications
Bogdan, no it will not VS2008 and VS2010 can co-exist. In fact though, you can write SL3 apps with VS2010 as well as it provides multi-targeting for Silverlight apps as well.
5/9/2010 10:55 PM | # re: Backward Compatibility with Silverlight 4 applications
I created silverlight project in VS2008 and using SL3 latest toolkit.
Now i installed VS2010 and SL4, i am opening my previous project in VS2010 by changing target runtime to SL4. I am getting compile errors for some objects like Expander,..... How to resolve these errors.
5/31/2010 2:34 AM | # re: Backward Compatibility with Silverlight 4 applications
If we are tied in for targeting Silverlight 3 clients and also using VS 2008 I am trying to download and install the correct RIA services setup but it is not entirely clear which one I should be using. Since the official wcf ria services was release it seems silverlight 3 is getting forgotten.
3/12/2011 6:34 AM | # re: Backward Compatibility with Silverlight 4 applications
Your users will see these whenever code requires 70-542 test things like requesting device access for webcam/microphone, clipboard access, or quota increase for IsolatedStorage. 70-652 test In the beta we showed these dialogs always and didn’t have a mechanism for enabling 70-515 test the user to determine if they wanted 70-562 test their consent preference saved. That has changed in this release

Please add 8 and 6 and type the answer here:


The opinions/content expressed on this blog are provided "ASIS" with no warranties and are my own personal opinions/content (unless otherwise noted) and do not represent my employer's view in any way.