Thursday, May 27, 2010

Error referencing SharePoint Client DLLs in Silverlight

Scenario:
I build up a new VM and was experimenting with Silverlight and SharePoint. I created a new Silverlight Application Project in Visual Studio. Then I tried adding the client object model dlls.

Microsoft.SharePoint.Client.Silverlight.dll
and
Microsoft.SharePoint.Client.Silverlight.Runtime.dll

located at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin" and surprisingly got this

error sl client

Sometime your project build just fine but you get referencing error at run time, something like this.

error sl client2

Solution:
Two step solution was
1. Copy both the binaries from
"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin" to "C:\SilverlightClientOM" folder.

2. Reference from the new folder

0 comments: