Home

LinqPad as scratchboard for C#

I use LinqPad to learn different things beyond Linq query. It works great in many situations. For example, access Raven database with Raven.Client.Lightweight. Also accessing SharePoint through its Client Object Model works fine. However, when I tried to use SharePoint Server Object Model, I got FileNotFoudnException even though the SharePoint site is there. Basically
Microsoft.SharePoint.Client.ClientContext clientContext =
new ClientContext("http://localhost/");
works but
Microsoft.SharePoint.SPSite _site =
new Microsoft.SharePoint.SPSite("http://localhost");
gives exception. Same code in Visual Studio works.

Why LinqPad is picky on SharePoint SOM?

Thanks.

Comments

Sign In or Register to comment.