Looking for sharepoint Answers? Try Ask4KnowledgeBase
Looking for sharepoint Keywords? Try Ask4Keywords

sharepointWorking with Managed Client Side Object Model (CSOM)


Remarks

  • Most examples are from MSDN.
  • To create a .NET managed client application that uses the client object model, you must set references to two client library DLLs: Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll. You can find it in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\16\ISAPI folder or your SharePoint server.
  • or Install the Microsoft.SharePointOnline.CSOM NuGet Package, which will work "on prem" as well as in SP O365.
  • Most properties are value properties and before accessing them you need to explicitly call clientContext.Load() and clientContext.ExecuteQuery(). More info here: Call Load and ExecuteQuery Before Accessing Value Properties