Hi,
I'm using this code to create a project from a package (SDL Trados Studio 2019 Professional, version SR2 - 15.2.8.3007):
var project = FileBasedProject.CreateFromProjectPackage(packagePath, outputPath, out result);
result.Status is PackageStatus.Failed.
result.Messages:
The type initializer for 'Sdl.LanguagePlatform.TranslationMemoryImpl.Storage.SqliteStorage' threw an exception. Sdl.ProjectAutomation.Core.ProjectAutomationException: Exception of type LanguagePlatformException occurred: The type initializer for 'Sdl.LanguagePlatform.TranslationMemoryImpl.Storage.SqliteStorage' threw an exception.
Stacktrace:
at Sdl.LanguagePlatform.TranslationMemoryApi.AbstractLocalTranslationMemory.get_Setup()
at Sdl.LanguagePlatform.TranslationMemoryApi.FileBasedTranslationMemoryLanguageDirection.get_TargetLanguage()
at Sdl.ProjectApi.Implementation.TranslationMemoryInfo.GetTargetLanguage()
at Sdl.ProjectApi.Implementation.CopyableTranslationProviderItem.get_TargetFilePath()
at Sdl.ProjectApi.Implementation.CopyableTranslationProviderItem.CopyTranslationProvider()
at Sdl.ProjectApi.Implementation.Project.CopyTranslationProviderCascadeEntry(ProjectCascadeEntryItem fromEntry, ProjectCascadeItem toCascade, Boolean copyMainTm, Boolean copyProjectTm, ILanguageDirection toLanguageDirection)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.UpdateTranslationProviderCascade(ProjectCascadeItem fromCascadeItem, ProjectCascadeItem toCascadeItem, Project toProject, LanguageDirection toLanguageDirection)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.UpdateLanguageDirection(Project project, ILanguageDirection packageLanguageDirection, LanguageDirection languageDirection, IPackageProject packageProject)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.AddOrUpdateLanguageDirection(IPackageProject packageProject, Project project, ILanguageDirection packageLanguageDirection)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.AddOrUpdateLanguageDirections(IPackageProject packageProject, Project project)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.ImportPackageProject(IPackageProject packageProject, Boolean& isNewProject)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.StartImpl()
at Sdl.ProjectApi.Implementation.PackageOperation.Start() ---> Sdl.ProjectApi.ProjectApiException: Exception of type LanguagePlatformException occurred: The type initializer for 'Sdl.LanguagePlatform.TranslationMemoryImpl.Storage.SqliteStorage' threw an exception.
Stacktrace:
at Sdl.LanguagePlatform.TranslationMemoryApi.AbstractLocalTranslationMemory.get_Setup()
at Sdl.LanguagePlatform.TranslationMemoryApi.FileBasedTranslationMemoryLanguageDirection.get_TargetLanguage()
at Sdl.ProjectApi.Implementation.TranslationMemoryInfo.GetTargetLanguage()
at Sdl.ProjectApi.Implementation.CopyableTranslationProviderItem.get_TargetFilePath()
at Sdl.ProjectApi.Implementation.CopyableTranslationProviderItem.CopyTranslationProvider()
at Sdl.ProjectApi.Implementation.Project.CopyTranslationProviderCascadeEntry(ProjectCascadeEntryItem fromEntry, ProjectCascadeItem toCascade, Boolean copyMainTm, Boolean copyProjectTm, ILanguageDirection toLanguageDirection)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.UpdateTranslationProviderCascade(ProjectCascadeItem fromCascadeItem, ProjectCascadeItem toCascadeItem, Project toProject, LanguageDirection toLanguageDirection)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.UpdateLanguageDirection(Project project, ILanguageDirection packageLanguageDirection, LanguageDirection languageDirection, IPackageProject packageProject)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.AddOrUpdateLanguageDirection(IPackageProject packageProject, Project project, ILanguageDirection packageLanguageDirection)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.AddOrUpdateLanguageDirections(IPackageProject packageProject, Project project)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.ImportPackageProject(IPackageProject packageProject, Boolean& isNewProject)
at Sdl.ProjectApi.Implementation.ProjectPackageImport.StartImpl()
at Sdl.ProjectApi.Implementation.PackageOperation.Start()
--- End of inner exception stack trace ---
Thank you for your help,
Adam