| Comments

Yesterday a minor update to the Silverlight 2 runtime was released.  You may see terms of “GDR 1” floating around.  That’s pretty much an internal term at Microsoft referred to as “general distribution release” – yeah, I know we have a lot of random terms.  Think of it just as an incremental update.  If you are curious for Silverlight’s entire release history, you can view that here.

So what’s in it?  Well, nothing earth shattering if you were expecting feature updates.  There were some needed fixes based on customer feedback that we included in this update (which is version 2.0.40115.0).  Basically I would bucket it into a simple list for you:

  • Various accessibility fixes relating to UIAutomation
  • Fixes for certain anti-virus vendors scanning algorithms
  • Much needed fix for OSX platform when users modify their font locations (i.e., people with font management tools usually)
  • Bug in IsolatedStorage quota increasing when the user’s display language is set to one that Silverlight has not been localized to

That’s about it…no new controls, nothing suddenly going to make you amazed and shocked.  But it was a needed release to fix these issues. 

So what should you do?  Depends. 

If you are a consumer…

You really shouldn’t need to do anything unless you are specifically experiencing one of the issues above.  Web developers using Silverlight and needing their user’s to have this update will update their site and let you know.  There isn’t a huge need to rush out as an end-user and download the update.  Besides, if you have it configured to automatically update, then in due time you’ll get the update through that mechanism and won’t have to do anything.  If you absolutely want to be on top of things, then feel free to grab the latest updated runtime by visiting the download link.

If you are a developer…

If you are directly affected by the changes above then you should update your application.  There are really two things you need to do:

For the latter note this is a simple change.  Update your “MinRuntimeVersion” attribute in your hosting page/content to ensure that end users have the latest runtime version for your application.  Again, you should only really need/want to do this proactively if you (or your users) are directly affected by the updates in this release!  Here’s how you’d do it.

NOTE: Even though you update the developer runtime the Visual Studio project templates are not updated to set the default runtime version to the updated version so each new Silverlight project using those templates will still reference minRuntimeVersion=”2.0.31005.0” – if you want to change that you can modify the template.

UPDATE: How to modify the default value of the template

I’ve received some errors myself after changing this, so while it sounded like a good idea :-), I can’t recommend altering this reg value to the updated version – if I find out why, I’ll post here.

I got some questions about exactly how you would get the default web templates to change the generated test pages to emit the updated version number.  Since these are pages in a web project and not the Silverlight project, it isn’t easily found.  In fact, that value gets pulled from a registry setting.  The setting is at (removing the Wow6432Node if you are not on 64-bit Windows):

   1: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Silverlight\v2.0\ReferenceAssemblies]
   2: "SLRuntimeInstallVersion"="2.0.40115.0"

and you need to change the value to match what you want that to be.  Again, this is not a required step at all.

As a reminder, messing with your registry can be dangerous if you have no idea what you are doing.  Backup your reg keys, don’t blame me if something goes wrong :-).

If you are using the ASP.NET Silverlight control you’d modify the MinimumVersion and AutoUpgrade attributes:

   1: <asp:Silverlight ID="Xaml1" AutoUpgrade="true" runat="server" 
   2:                 Source="~/ClientBin/SilverlightApplication3.xap" 
   3:                 MinimumVersion="2.0.40115.0" Width="100%" Height="100%" />

If you are using the <object> tag instantiation you’d modify the minRuntimeVersion and autoUpgrade attributes in the <object> tag for your Silverlight application:

   1: <param name="minRuntimeVersion" value="2.0.40115.0" />
   2: <param name="autoUpgrade" value="true" />

If you are using Silverlight.js to create the object you’d modify the version attribute when passing it in to the properties parameter of the createObject function (sample):

   1: Silverlight.createObject(
   2:             "ClientBin/SilverlightApplication1.xap",  // source
   3:             silverlightControlHost,  // parent element
   4:             "slPlugin",  // id for generated object element
   5:             {
   6:                 width: "100%", height: "100%", background: "white", 
   7:                 version:"2.0.40115.0"
   8:             },
   9:             { onError: onSLError, onLoad: onSLLoad },
  10:             "param1=value1,param2=value2", 
  11:             "context"    // context helper for onLoad handler.
  12:         );

That’s it!  Hope this helps.  The team is diligently working on Silverlight 3!

Please enjoy some of these other recent posts...

Comments