Different versions of Microsoft.Sharepoint.dll
There seem to be two versions of Sharepoint's DLL.
I am trying to add a folder, using clientContext and updating the list. But I get an error "use SPFileCollection.Add()". I have seen heaps of these types around t开发者_运维问答he place (starting with "SP") but they're not in my version of Microsoft.Sharepoint.dll.
What am I missing? Is there more than one version?
I'm pretty sure @leppie is right: you need the Microsoft Client Object Model libraries.
Download the redistributable from Microsoft ( http://www.microsoft.com/download/en/details.aspx?id=21786 ). Then you'll want to reference the Microsoft.SharePoint.Client.dll in your project.
And just to be thorough, Microsoft has a good introduction to the SharePoint Client Object Model.
UPDATE: I found an SP1 version of the Client Object Model redistributable. Probably should go with that instead! http://support.microsoft.com/kb/2508825
精彩评论