You are currently working on UAT 

Null Reference in Convert file in 2019

This basic project automation line of code works in 2017 but not in 2019 why not?

var convertTask = project.RunAutomaticTask(fileIds, AutomaticTaskTemplateIds.ConvertToTranslatableFormat);

I can confirm that the fileIds are populated from the project and are correct. The project variable is instantiated with a valid project.

I get a null reference exception "Object not set to reference of Object" and in the exception information I can see that the fileId is indeed populated and correct.

When I switch all my .dll references and path back to 2017 Trados and change no code, everything works fine.