Hi,
I am trying to migrate a SharePoint 2010 list to Office 365. I created a new ListCreationInfo for a new list in O365. But when i am to trying add fields from SP2010 list, its giving me an error after list.update() -
A duplicate field name "fa564e0f-0c70-4ab9-b863-0177e6ddd247" was found.
if(!l.Hidden){ListCreationInformation creationInfo =newListCreationInformation(); creationInfo.Title= l.Title; creationInfo.TemplateType= l.BaseTemplate;List list = web.Lists.Add(creationInfo);//Fields in the list ctxOnPrem.Load(l.Fields); ctxOnPrem.ExecuteQuery();foreach(Field f in l.Fields)
list.Fields.AddFieldAsXml(f.SchemaXml,true,AddFieldOptions.DefaultValue);
list.Update();}
Note- l is the SharePoint 2010 List.