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.

Parents
  • He , the line of code that you mentioned above should work as expected. If it is returning null, then there must be some condition that is causing it, but without more information it is difficult to me to hypothesize what that could be.

    If the problem is still occurring,  can you please provide me with the source code you are running?

    Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group

    emoji
Reply
  • He , the line of code that you mentioned above should work as expected. If it is returning null, then there must be some condition that is causing it, but without more information it is difficult to me to hypothesize what that could be.

    If the problem is still occurring,  can you please provide me with the source code you are running?

    Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group

    emoji
Children
No Data