When migrating SharePoint Designer Workflows from SharePoint 2013 to SharePoint Online, the Workflows fail to migrate, with the following error:
Error: Exception has been thrown by the target of an invocation.
Stack: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Metalogix.Transformers.TransformerDefinition`4.Transform(T dataObject, A action, C1 sources, C2 targets, TransformerCollection transformers)
at Metalogix.SharePoint.Actions.Migration.PasteListItemAction.CopyDocument(SPListItem sourceItem, SPFolder targetFolder, SPListItem existingItem, SPListItem& newItem, Boolean& bItemNewlyCreated, String& sSourceXml, LogItem copyOperationLogItem, SPListItemCollection targetItemCollection)
at Metalogix.SharePoint.Actions.Migration.PasteListItemAction.CopyListItem(SPListItem sourceItem, Int32 iItemIndex, Nullable`1 iParentItemID, SPFolder targetFolder, SPListItemCollection sourceItems, SPListItemCollection& targetItems, Boolean bIsFolder, Boolean bPreservingItems, Boolean bIsNwsTarget, Boolean bIsCopyRoot, ListTemplateType targetListTemplate, Dictionary`2& itemIdMap, List`1 filteredFolders)
Type: System.Reflection.TargetInvocationException
HResult:-2146232828
Inner Exception Error: Name cannot begin with the ''' character, hexadecimal value 0x27. Line 11, position 112.
Stack: at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset, Int32& colonPos)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at Metalogix.SharePoint.Actions.Transform.WorkflowDataUpdater.MapXomlWorkflowData(PasteListItemAction action, SPListItem sourceItem, String constructedString, String versionNo, SharePointVersion targetVersion, SPWeb targetWeb)
at Metalogix.SharePoint.Actions.Transform.WorkflowDataUpdater.MapWorkflowFileData(PasteListItemAction action, SPListItem sourceItem, SharePointVersion targetVersion, SPWeb targetWeb)
at Metalogix.SharePoint.Actions.Transform.WorkflowDataUpdater.Transform(SPListItem dataObject, PasteListItemAction action, SPListItemCollection sources, SPListItemCollection targets)
Type: System.Xml.XmlException
HResult:-2146232000