Wednesday, August 27, 2008

Deploying the new Silverlight Blueprints

I decided to spend some of my Sunday afternoon trying the new Silverlight Blueprints.

I first upgraded my VM to include the new .Net 3.5 SP1 and Visual Studio 2008 SP1. All went well. I installed the new Silverlight add on for VS2008 SP1.

I created a new web application and a new site collection to host my silverlight web parts.

I went to deploy the HelloWorld example and was getting a list not found exception when it tried to activate the feature.

After a bit of looking around, I noticed that I was supposed to create a document library at the root of the site collection called XAPS to host the XAP files. I went to create the library after checking that it didn't already exist. It created fine, but still no luck deploying. Then I noticed that the URL being created had the name "XAPS1". I deleted and re-created the library but couldn't get it to create "XAPS" in the URL. I deleted my site collection and re-created it. Created the XAPS document library and then tried again and it worked perfectly... :) (That will teach me to read the guidance carefully)

image

Then I moved on to the Media Viewer web part, thinking it would deploy just the same. Hmm, not quite. It did deploy okay from Visual Studio, but then when trying to add it to a page, I got this error;

image

Method not found: 'Void System.Web.UI.SilverlightControls.Silverlight.set_MinimumVersion(System.String)'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: Method not found: 'Void System.Web.UI.SilverlightControls.Silverlight.set_MinimumVersion(System.String)'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

[MissingMethodException: Method not found: 'Void System.Web.UI.SilverlightControls.Silverlight.set_MinimumVersion(System.String)'.]
   SL.SharePoint.WebParts.MediaViewerWebPart.CreateChildControls() +0
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.WebControls.WebParts.Part.get_Controls() +15
   SL.SharePoint.WebParts.MediaViewerWebPart.OnLoad(EventArgs e) +136
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

Then I tried the slider controls in a survey and they did not render either.

After some troubleshooting, I discovered that I had a rogue copy of the System.Web.Silverlight.dll in the bin folder of another SharePoint web application. This is one I had used to try out the Podcast Kit for SharePoint.

I renamed this other version, and after an IISRESET, the blueprint controls started working....

image

image

image

1 comment:

Jim Mullennix said...

Thanks for the tips. Saved me a lot of time.