'How do I correct this Naked Agility Work Item Migration tool error: Name cannot be null

I'm a new user trying to debug why the migration tool (Now running Version: 11.11.26.0) gives me this error.

I'm a system admin migrating from on-prem TFS 2017 to Azure DevOps. I've created the Azure DevOps projects and I've tried now 5 different projects, all get this error. I suspect I'm missing something in my config files. I've tried to use a minimal config file, possibly too minimal.

The new tool release (26) did not resolve my error unfortunately.

I've also tried creating TFS projects with no code just a couple of Work Items and both TFVC and Git TFS projects and they all still get the below "Value cannot be Null" error.

There is only one processor and it outputs: System.ArgumentNullException: Value cannot be null. Parameter name: name

My most recent attempt uses a TFS test project with no code and only 2 Work Items.

Here is most of the config file from a new TFS Agile Git project with no code repo:

{
  "ChangeSetMappingFile": null,
  "Version":"11.11",
  "LogLevel": "Information",
  "WorkItemTypeDefinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },
  "source": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://tfs.oldrepublictitle.com/ORTC-Collection/",
    "Project": "WIT_Migration_Git_Test1",
    "AllowCrossProjectLinking": false,
    "AuthenticationMode": "AccessToken",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "Target": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://dev.azure.com/ortdevops/",
    "Project": "TEST-WorkItem-Migration",
    "AllowCrossProjectLinking": false,
    "AuthenticationMode": "AccessToken",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "FieldMaps": [
    {
      "$type": "FieldBlankMapConfig",
      "WorkItemTypeName": "*",
      "targetField": "TfsMigrationTool.ReflectedWorkItemId"
    },
    {
      "$type": "FieldValueMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "System.State",
      "targetField": "System.State",
      "defaultValue": "New",
      "valueMapping": {
        "Approved": "New",
        "New": "New",
        "Committed": "Active",
        "In Progress": "Active",
        "To Do": "New",
        "Done": "Closed",
        "Removed": "Removed"
      }
    },
    {
      "$type": "FieldMergeMapConfig",
      "WorkItemTypeName": "*",
      "sourceField1": "System.Description",
      "sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
      "sourceField3": null,
      "targetField": "System.Description",
      "formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
      "doneMatch": "##DONE##"
    },
    {
      "$type": "RegexFieldMapConfig",
      "WorkItemTypeName": "*",
      "sourceField": "COMPANY.PRODUCT.Release",
      "targetField": "COMPANY.DEVISION.MinorReleaseVersion",
      "pattern": "PRODUCT \\d{4}.(\\d{1})",
      "replacement": "$1"
    },
  ],
  "WorkItemTypeDefinition": {
    "Bug": "Bug",
    "Product Backlog Item": "Issue",
    "Feature": "Feature",
    "Task": "Task",
    "Code Review Request": "Task",
    "Code Review Response": "Task"
  },
  "Processors": [
    {
      "$type": "WorkItemMigrationConfig",
      "Enabled": true,
      "ReplayRevisions": true,
      "PrefixProjectToNodes": false,
      "UpdateCreatedDate": false,
      "UpdateCreatedBy": false,
      "BuildFieldTable": false,
      "AppendMigrationToolSignatureFooter": false,
      "WIQLQueryBit": "AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan', 'Bug')",
      "WIQLOrderBit": "[System.ChangedDate] desc",
      "LinkMigration": true,
      "AttachmentMigration": true,
      "AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
      "FixHtmlAttachmentLinks": false,
      "SkipToFinalRevisedWorkItemType": true,
      "WorkItemCreateRetryLimit": 5,
      "FilterWorkItemsThatAlreadyExistInTarget": false,
      "NodeStructureEnricherEnabled": true,
      "PauseAfterEachWorkItem": false,
      "AttachmentMaxSize": 480000000,
      "AttachRevisionHistory": false,
      "LinkMigrationSaveEachAsAdded": false,
      "GenerateMigrationComment": true,
      "WorkItemIDs": null,
      "MaxRevisions": 0
    }
  ],
  "Endpoints": {
    "InMemoryWorkItemEndpoints": [
      {
        "Name": "Source",
        "EndpointEnrichers": null
      },
      {
        "Name": "Target",
        "EndpointEnrichers": null
      }
    ]
  }
}

Here is most of a run's output from the config above:

[13:30:04 INF] Migrating all Nodes before the Processor run.
[13:30:05 INF]  Processing Node: \TEST-WorkItem-Migration\Iteration\Iteration 1, start date: null, finish date: null
[13:30:05 INF]  Processing Node: \TEST-WorkItem-Migration\Iteration\Iteration 2, start date: null, finish date: null
[13:30:05 INF]  Processing Node: \TEST-WorkItem-Migration\Iteration\Iteration 3, start date: null, finish date: null
[13:30:07 INF] Querying items to be migrated: SELECT [System.Id], [System.Tags] FROM WorkItems WHERE [System.TeamProject
] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan', 'Bug') ORDER BY [System.ChangedDate] desc
...
[13:30:08 INF] Replay all revisions of 2 work items?
[13:30:08 INF] Found target project as TEST-WorkItem-Migration
[13:30:08 FTL] Error while running WorkItemMigration
System.ArgumentNullException: Value cannot be null.
Parameter name: name
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection.Contains(String name)
   at MigrationTools.ProcessorEnrichers.TfsValidateRequiredField.ValidatingRequiredField(String fieldToFind, List`1 sour
ceWorkItems) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\ProcessorEnrichers\TfsValidateRequiredField.
cs:line 53
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution
\MigrationContext\WorkItemMigrationContext.cs:line 125
   at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Proc
essors\MigrationProcessorBase.cs:line 47
[13:30:08 ERR] WorkItemMigration The Processor MigrationEngine entered the failed state...stopping run
[13:30:08 INF] Application is shutting down...
[13:30:08 INF] Terminating: Application forcebly closed.
[13:30:08 INF] Application Ending
[13:30:08 INF] The application ran in 00:00:06.9585120 and finished at 02/08/2022 13:30:08
PS D:\AzureMigrationTool\MigrationTools-11.11.26>

How can I determine where the null name is located to correct it?

Any guidance would be greatly appreciated.

Thanks Dan



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source