I have created new content type in CSOM, i need to set the newly created content type as default content type for the custom created sharepoint list. I am using below code.
List aeList = ctx.Web.Lists.GetByTitle("Project Definition");
var currentCtOrder = aeList.ContentTypes;
ctx.Load(currentCtOrder, coll => coll.Include(
ct => ct.Name,
ct => ct.Id));
ctx.ExecuteQuery();
IList<ContentTypeId> reverseOrder = (from ct in currentCtOrder where ct.Name.Equals("Project Definition", StringComparison.OrdinalIgnoreCase) select ct.Id).ToList();
aeList.RootFolder.UniqueContentTypeOrder = reverseOrder;
aeList.RootFolder.Update();
aeList.Update();
ctx.ExecuteQuery();
But the code gives error saying "System.NotSupportedException:'Specified method is not supported'" while querying on line no. 5
Can someone help?