We use Trados API to import packages. When we import one package manually, we get the question "The file X.sdlxliff contained in the package is older than the file in your project. Do you want to overwrite it?". When we try to import this package through the API, we get an error message as below. Our tool is called BatchRunner.exe.
INFO 28/Feb/2017 08:55:28: Starting to process targetLanguage: pl-PL
returnPackageDir: C:\Users\kgr\AppData\Local\Temp\ygkdnl41.zro
projectPackageDir: C:\Users\kgr\AppData\Local\Temp\vnj5ieco.pg3
INFO 28/Feb/2017 08:55:28: Percent complete: 0, StatusMessage:
INFO 28/Feb/2017 08:55:28: Percent complete: 0, StatusMessage: Opening package
INFO 28/Feb/2017 08:55:29: Percent complete: 30, StatusMessage: Importing files
INFO 28/Feb/2017 08:55:29: Message: Sdl.ProjectAutomation.Core.ExecutionMessage
INFO 28/Feb/2017 08:55:29: Percent complete: 30, StatusMessage:
ERROR 28/Feb/2017 08:55:29 Qlik.Trados.BatchRunner.Program.Main(:0): System.InvalidOperationException: This property is only available once the package has been imported.
ReturnPackageImport import = project.ImportReturnPackage(returnPackageFile, ProcessTaskStatusEvent, ProcessTaskMessageEvent);