Updating a SilverLight 4.0RC application to 4.0 RTM
I downloaded the source code to this project:
SilverVNC - a VNC Viewer with Silverlight 4.0 RC
It builds just fine but when I run it I get this message (when the browser launches and presumably from the browser's SilverLight runtime):
This application was created for an expired beta release of Silverlight. Please contact the owner of this application and have them upgrade their application using an official release of Silverlight.
I have all the requisite SilverLight 4.0 RTM bits installed (I've never installed a SilverLight beta or RC on this machine before), what items should I look for in the project to update to get it to run?
I noticed that two of the projects in the solution reference version 3 Silverlight assemblies. I updated these to 4.0 (both the projects and the references to 4.0) but I still get this开发者_JAVA技巧 error. I've guessing there's something in the project file itself that needs tweaking.
Having never written a line of code for SilverLight I'm a bit lost.
The project file may have references to pre-built assemblies that may be built for the SL4 RC. The project may even reference the Silverlight 4 RC assemblies.
There are two things you can try. Either you can remove the references from the project and add them again so that they are updated to the RTM, or you can create a new Silverlight 4 project and import all the source code into that. This should at least work.
Edit:
There may be one other solution. You may have an old version of the SL4 developer tools installed. I seem to remember having a similar issue when the RTM was released. So you may want to download and reinstall the SL4 developer tools.
Modify the object tag in the startup rfb.html file to reference the latest version of the runtime. Right now, its "4.0.60129.0"
From:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/SilverlightPlayground.RFB.Silverlight.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40624.0" />
<param name="autoUpgrade" value="true" />
To:
<param name="minRuntimeVersion" value="4.0.60129.0" />
精彩评论