I've found the following link on msdn and I've been struggeling to get it running. I had to use Microsoft.SharePoint.Client.dll from 16 hive (I'm using SharePoint 2013 server) inside Visual Studio to get no compile error. After running the following code, I got a "Method not found" exception:
var clientContext = new ClientContext("http://myserver"); var fileGuid = new Guid("D51C440B-4F52-4005-90BE-BDC42E850975"); var file = clientContext.Web.GetFileById(fileGuid); clientContext.Load(file); clientContext.ExecuteQuery();
Please help me on what I'm doing wrong.