private static void DeleteFieldsSpecifiedInFile(ClientContext context, string file) { Log.Info("Deleting all fields with the same group as the ones in the file " + file); var siteColumnPersister = new FilePersistanceProvider<List<ShField>>(file); var siteColumnManager = new FieldManager(context, siteColumnPersister.Load()); siteColumnManager.DeleteAllCustomFields(); }