CreateFileBasedTM throws exception in Studio 2022

Hi,

I'm getting an exception calling CreateFileBasedTM in Trados Studio 2022 SR2 - 17.2.10.19084:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Data.SqlClient, Version=4.1.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Sdl.LanguagePlatform.TranslationMemoryImpl.API.GenerateFault(Exception e)
at Sdl.LanguagePlatform.TranslationMemoryImpl.API.<CreateSchemaAsync>d__148.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sdl.Core.Globalization.LegacyAsyncHelpers.<>c__DisplayClass2_0`1.<WrapUnavoidableAsyncCode>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sdl.Core.Globalization.LegacyAsyncHelpers.WrapUnavoidableAsyncCode[T](Func`1 fn)
at Sdl.LanguagePlatform.TranslationMemoryImpl.API.CreateSchema(Container container)
at Sdl.LanguagePlatform.TranslationMemoryApi.FileBasedTranslationMemory.FileBasedTranslationMemoryDescriptor..ctor(String tmFilePath, String description, CultureCode sourceLanguage, CultureCode targetLanguage, FuzzyIndexes indexes, BuiltinRecognizers recognizers, TokenizerFlags tokenizerFlags, WordCountFlags wordCountFlags, Boolean supportsAlignmentData, TextContextMatchType textContextMatchType, Boolean usesIdContextMatch, Boolean usesLegacyHashes)
at Sdl.LanguagePlatform.TranslationMemoryApi.FileBasedTranslationMemory..ctor(String tmFilePath, String description, CultureCode sourceLanguage, CultureCode targetLanguage, FuzzyIndexes indexes, BuiltinRecognizers recognizers, TokenizerFlags tokenizerFlags, WordCountFlags wordCountFlags, Boolean supportsAlignmentData)
at StudIO2022.TMCreator.CreateFileBasedTM(String tmPath, String source, String target)
at StudIO2022.Program.Main(String[] args)

The same call works correctly in Studio 2019.

Thank you for your help,

Adam

  • Now I'm getting a different exception. Licence check fails, although the exe is in the Studio project folder:

    Sdl.ProjectAutomation.FileBased.LicensingException
    HResult=0x80131500
    Message=License check failed, with exception: System.NullReferenceException: Object reference not set to an instance of an object.
    at Sdl.ProjectApi.Licensing.StudioApplicationLicenseManager.get_ApplicationLicenseManager()
    at Sdl.ProjectAutomation.FileBased.FileBasedProject.CheckLicense()
    Source=Sdl.ProjectAutomation.FileBased

  • After repairing Trados, I no longer get the licence check failure. Now I get a different exception:

    Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

  • Thank you for bringing this to our attention. Our development team will review it in the context of our ongoing projects and priorities. Your understanding and patience as we assess this matter is appreciated. We have recorded the issue in our tracking system under the reference number CRQ-39361
  •   

    Hello!

    I reproduced the issue in a standalone app compiled against Studio 2022 SR2. To resolve it, I added a reference to Microsoft.Data.SqlClient directly from NuGet. And because this worked, I didn't encounter any issues with Microsoft.Extensions.Logging.Abstractions, which you described in later comments. It might be worth trying to add that from NuGet as well.

    You can find the standalone app I used here. Just comment out any parts you don't need.

    The Studio Team will investigate further, but in the meantime, these suggestions might help resolve the issue.