views:

47

answers:

2

We're using a combination of Silverlight 4, .net 4 and VS2010 for several internal projects. When building a project, we're not manually specifying the build of silverlight that we require anywhere other than in the page that gets auto-generated.

We're having problems with the clients requiring the absolute latest build of silverlight that's out, and as our IT department use a packaging solution to deploy software - they can't spare time to update the package every 2 months.

On our dev machines, we've got full admin rights, however, on the clients where they run these apps, the machines are locked down, and the users can't install anything.

We've tried playing about with the tags created in the HTML to require a several month old release that IT have packaged, to no avail (see our html below).

<div id="silverlightControlHost">
   <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
          <param name="source" value="/ClientBin/xapfilename.xap"/>
          <param name="onError" value="onSilverlightError" />
          <param name="background" value="white" />
          <param name="minRuntimeVersion" value="4.0.50401.0" />
          <param name="autoUpgrade" value="false" />
          <a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=4.0.50401.0" style="text-decoration:none">
              <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
          </a>
    </object>
    <iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
</div>

Has anybody got any ideas on how to make silverlight work with the older version (4.0.50401.0) as opposed to the latest version (4.0.50917.0)?

+3  A: 

This blog post from Tim Heuer may be helpful: Understanding Silverlight releases (and the September 2010 2nd service update)

Every time someone asks me about this, my first question is if they’ve installed the updated SDK. Almost all the time the answer is yes. And that is where the issue is (as also they’ve recompiled their app). Along with the minRuntimeVersion, within the XAP the AppManifest.xml file there is also a RuntimeVersion attribute stamped for the app. Both of these versions are being set by the version of the SDK. So when you install a new SDK, that version is the value used here.

NOTE: Your tag minRuntimeVersion isn’t updated on existing projects, but check on a new project and you’ll see it updated there.

So even though you might have specified in the tag minRuntimeVersion for RTW (4.0.50401.0), the fact that the XAP is demanding (via the AppManifest) a later version is what is causing the conflict.

Matthew Paul Keelan
+3  A: 

The required version is determined by the Silverlight SDK version you built the project with.

To go back to an older version you would need to use the older SDK (along with any bugs that have since been fixed).

Best start archiving any SL SDKs you use. I am not sure if the older versions are still available.

Enough already