SDL Studio 2019 SR 2 - Sdl.Desktop.Platform.Services.IUserSettingsService service not available when creating FileBasedProject(projectInfo, templateReference) after updating to SR 2

Hi devs, hi community,

with an updated studio we run into the following issue.

  • Before the update we created a FileBasedProject with projectInfo and templateReference which worked as expected.
  • After the update the constructor keeps throwing the following exception: service not available Sdl.Desktop.Platform.Services.IUserSettingsService

We tried the following solutions:

  1. Restart after installing the update
  2. Reimport all references as suggested in https://community.sdl.com/developers-more/developers/language-developers/f/sdk_qa/1366/service-sdl-desktop-platform-services-iusersettingsservice-could-not-be-started
  3. Reset trados studio as suggested in https://community.sdl.com/product-groups/translationproductivity/f/studio/3260/error-on-startup-service-sdl-desktop-platform-commandbars-iactionservice-could-not-be-started

but couldn't fix the problem or figure out what the cause of the exception was.

Is it possible that a faulty Sdl.ProjectAutomation.Core.ProjectInfo causes the exception? Do we need to enter necessary values?

Do you have any other suggestions?

Best regards,

Hendrik

We updated from: Version 15.2.0.1041

to: SDL Trados Studio 2019 SR2 Version 15.2.4.1693

Parents
  • Hi Hendrik,

              There is a configuration issue in CU 4 that will be handled in CU 5 that will be released in the following months. In the meantime you can bypass this error using reflection like this  :

    1.) Add the following nuget package to your project or download it and extract the dll's : https://www.nuget.org/packages/SimpleInjector/

    2.) Using reflection we need to inject the container to GlobalServices so it can properly register all the services. Be aware that I put in the default location for that dll however if you have the API copied into another location you will have to change the path. Below is a code sample how to do that in C# : 

           var container = new SimpleInjector.Container();

           Assembly a = Assembly.LoadFile(@"C:\Program Files (x86)\SDL\SDL Trados Studio\Studio15\Sdl.Desktop.Platform.dll");

           Type myType = a.GetType("Sdl.Desktop.Platform.Services.GlobalServices");

           MethodInfo myMethod = myType.GetMethod("RegisterStandardServices");

           myMethod.Invoke(null, new object[] { container });

    Best regards,
    Robert

Reply
  • Hi Hendrik,

              There is a configuration issue in CU 4 that will be handled in CU 5 that will be released in the following months. In the meantime you can bypass this error using reflection like this  :

    1.) Add the following nuget package to your project or download it and extract the dll's : https://www.nuget.org/packages/SimpleInjector/

    2.) Using reflection we need to inject the container to GlobalServices so it can properly register all the services. Be aware that I put in the default location for that dll however if you have the API copied into another location you will have to change the path. Below is a code sample how to do that in C# : 

           var container = new SimpleInjector.Container();

           Assembly a = Assembly.LoadFile(@"C:\Program Files (x86)\SDL\SDL Trados Studio\Studio15\Sdl.Desktop.Platform.dll");

           Type myType = a.GetType("Sdl.Desktop.Platform.Services.GlobalServices");

           MethodInfo myMethod = myType.GetMethod("RegisterStandardServices");

           myMethod.Invoke(null, new object[] { container });

    Best regards,
    Robert

Children