I have been really wanting to spend time on Silverlight lately. I am a real visual learner (and teacher) so Silverlight and SharePoint are a natural fit for me. I want to build up a few posts about the joys and sorrow of getting started. So here goes:

  1. Make sure that the post you are reading pertains to your version of Silverlight. I wasted a lot of time on Beta 2 posts while I was troubleshooting. A few things have changed.
  2. Make sure you are using an authoritative source for your info, not a hack.
  3. Take a methodical approach to building your development environment. I used the Getting Started Video on Silverlight.net.
  4. Take baby steps as you build your environment. Just like building SharePoint Web parts, Silverlight has a lot of moving parts. Create the project and build it right away. Test the build and then start ripping through your code. For example, I could not get the simplest empty project to build on my machine. (64 bit Vista). This is my first project:


Graphically rich and compelling, don’t you think? NOT…


image So out to the forums and I found this post that implicated the 64bit environment. So I opened up my references and set the System.Web.Silverlight.dll Copy Local property to True. Rebuild the project and everything works as advertised.


Here is the whole error

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly ‘System.Web.Silverlight’ or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 1:  <%@ Page Language="C#" AutoEventWireup="true" %>
Line 2: 
Line 3:  <%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
Line 4:      TagPrefix="asp" %>
Line 5: 

Source File:

Assembly Load Trace: The following information can be helpful to determine why the assembly ‘System.Web.Silverlight’ could not be loaded.