I have ran the tool and it executes perfectly like how it is. At the end of migration I get the below message "Exiting with return code: 0".
Normally, I wouldnt bother. However, I am implementing the migration using Azure DevOps release pipelines. With this message the deployment stage always fails.
Does someone has any idea about this error
The last few lines of execution
Migration Processor Complete TfsTeamSettingsProcessor
2021-04-23T07:12:23.4698310Z [07:12:23 INF] TfsTeamSettingsProcessor completed in 00:00:02.9601088
2021-04-23T07:12:23.4746613Z [07:12:23 INF] Application is shutting down...
2021-04-23T07:12:23.4787008Z [07:12:23 DBG] Hosting stopping
2021-04-23T07:12:23.4792590Z [07:12:23 DBG] Exiting with return code: 0
2021-04-23T07:12:23.4797995Z [07:12:23 INF] Terminating: Application forcebly closed.
2021-04-23T07:12:23.4802683Z [07:12:23 INF] Application Ending
It looks like robocopy exit codes 0-7 indicate success. I changed from command line execution to powershell command and added this to the bottom of your script:
if ($lastexitcode -lt 8) { $lastexitcode = 0 }
This works for me.