views:

176

answers:

2

I'm running the absolute latest versions of Silverlight and Visual Studio 2010 Professional and built a solution that contained a WPF project. From there, I added a SketchFlow project (based on Blend 4 RC) and I can run each project within the solution just fine by setting whenever I switch between them as startup projects. From there, I added a Silverlight 4 Business Application (taking all the defaults), and when simply trying to set that as the startup project and running it, VS2010 is giving me the following error after trying to open a web page:

Line: 56 (in file TestPage.aspx) Error: Unhandled Error in Silverlight Application Code: 8001
Category: InitializeError
Message: Upgrade required

If I choose not to debug, I get the Silverlight page saying "This page requires a more recent version of Silverlight"! Clicking "Install Now" on the popup window brings me to Mirosoft's Silverlight page where I see:

"The version of Silverlight originally requested is not available. You can get a supported version from this page. This Web browser or operating system may not be compatible with Silverlight. Please review the system requirements and, if you wish to proceed, choose the link for your operating system."

If I choose to upgrade anyway, I'm told that I'm running the latest version of Silverlight available.

What the heck? I'm running the final versions of VS2010 Pro, Silverlight 4, and the latest version of Expression Blend 4 (RC). Why can't VS2010 run this default Silverlight Business App? Any ideas? Please??

Thanks, Lu10ntDn

PS. This is on Windows 7 with UAC turned off, and ALL latest Windows Updates installed.

A: 

Did you install the developer verison of Silverlight? If not, that may be why Visual Studio can't run the application.

If you did install the developer version of Silverlight, then you may take a look at the minRuntimeVersion needed by the application. See this MSDN reference regarding the Silverlight Plug-in versioning.

Robert Williams
I just uninstalled all Silverlight 4 and RIA Services related installations and then reinstalled everything. I even took the opportunity to install the final (trial version) of Blend 4 too.I'm still getting the same error, and both times I had the developer version of SL4 installed. I'll take a look at the MSDN reference you gave. Hopefully, it's just a matter of overwriting a version number in my test page. Thanks!
Lu10ntDan
Before attempting any manual changing of the code according to the page referenced abopve, I decided to do one last thing which was to delete the new SL4 Business App project and try adding a new one.Lo and behold, it actually worked. I'm not sure if it's because of the various uninstalls and installs I did or what, but all is happy again now.Thanks anyway Robert, for the pointers...
Lu10ntDan
@Lu10ntDan - I'm glad you got it working!
Robert Williams
A: 

Open TestPage.aspx and find the following block:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
          <param name="source" value="ClientBin/TheNameOfYourApp.xap"/>
          <param name="onError" value="onSilverlightError" />
          <param name="background" value="white" />
          <param name="minRuntimeVersion" value="4.0.50401.0" />
          <param name="uiculture" value="<%= System.Threading.Thread.CurrentThread.CurrentUICulture %>" />
          <param name="culture" value="<%= System.Threading.Thread.CurrentThread.CurrentCulture %>" />
          <param name="autoUpgrade" value="true" />
          <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>

Do the values above match with what you have in your aspx page? if not then you need to make sure you are using the latest version of Silverlight. If that is the case, then you can change the values in your file to match the ones shown above.

Ricardo
Thanks for the additional info, Ricardo. Now I'll know where to check if it happens again.
Lu10ntDan