CU4 of Studio 2019 - creating the project object leads to exception: "The requested service is not available: Sdl.Desktop.Platform.Services.IUserSettingsService."

Hi guys,

I have an issue with this code:

NewProj = New FileBasedProject(NewProjInfo)

When I do this, I get "The requested service is not available: Sdl.Desktop.Platform.Services.IUserSettingsService."

I am using this line of code for 10 years to create an empty project object and it always worked. But since I installed CU4 of STudio 2019 SR1, this code does not work any longer. 

Can you shed a light please?

Thanks, 

Tom

Parents Reply
  • Hi Robert,

    Here is a small example that fails for me:

    public FileBasedProject CreateProject(string projectDir,
    string name,
    string trdSource,
    string trdTarget)
    {
    // Set up the project
    ProjectInfo info = new ProjectInfo
    {
    Name = name,
    LocalProjectFolder = projectDir
    };

    // Set the source language
    info.SourceLanguage = new Language(trdSource);
    // Set the targets
    info.TargetLanguages = new Language[1] { new Language(trdTarget) };

    // Create the project
    FileBasedProject newProject = new FileBasedProject(info);

    newProject.Save();
    return newProject;
    }

    I call it as this:

    t21Test.CreateProject(@"C:\Temp\", "Testproject", "en-US", "fr-FR" );

    I get this exception when calling new FileBasedProject(info);

    Sdl.Desktop.Platform.Services.ServiceNotAvailableException
    HResult=0x80131500
    Message=The requested service is not available: Sdl.Desktop.Platform.Services.IMessageService.
    Source=Sdl.ProjectAutomation.FileBased
    StackTrace:
    at Sdl.ProjectAutomation.FileBased.FileBasedProject.GetDefaultProjectTemplateReference()
    at Sdl.ProjectAutomation.FileBased.FileBasedProject..ctor(ProjectInfo projectInfo)

    I import the following:

    using Sdl.Core.Globalization;
    using Sdl.ProjectAutomation.Core;
    using Sdl.ProjectAutomation.FileBased;

    thanks,

    -ys

Children