i am trying to enable versioning on a ducument library using the client object model my code currently is as follows when i create the document library.
ClientContext clientContext = getClientContext();
try
{
Web web = clientContext.Web;
ListCollection listCol = web.Lists;
ListCreationInformation lci = new ListCreationInformation();
lci.Title = DocLib;
lci.TemplateType = (int)ListTemplateType.DocumentLibrary;
List documentLibrary = listCol.Add(lci);
documentLibrary.EnableVersioning = true;
documentLibrary.EnableMinorVersions = true;
documentLibrary.ContentTypesEnabled = true;
clientContext.Load(listCol);
clientContext.ExecuteQuery();
Console.WriteLine("doclibCreated created");
return documentLibrary;
}
catch (Microsoft.SharePoint.Client.ServerException e)
{
Console.WriteLine(e.Message);
return null;
}
but these settings are not persisted