Developing application to automate translations

Hi

I am trying to develop an application which will create a translation project, then load the translation memory and process a number of files, producing translated output files. I was going to use FileBasedProject to create a new project, then using the FileBasedTranslationMemory to determine the source/destination languages, and then convert the files.

I found (in the SDK samples) that there's a program in the project automation samples called BatchAnalyze which does pretty much what I want. However, this simple application compiles, but does not run.  When I compile and run (in its original form, it crashes ProjectCreator.cs:50

FileBasedProject newProject = new FileBasedProject(this.GetProjectInfo(srcLocale, trgLocale));

with error:

log4net:ERROR XmlConfigurator: Failed to find configuration section 'log4net' in
the application's .config file. Check your .config file for the <log4net> and <
configSections> elements. The configuration section should look like: <section n
ame="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /
>

and Managed Debugging Assistant 'PInvokeStackImbalance' occurred
HResult=0x00000000
Message=**Managed Debugging Assistant 'PInvokeStackImbalance' :** 'A call to PInvoke function 'SentinelRMSCore!SentinelRMSCore.Interface.LSAPI::VLSsetFileName' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.'

 

I was originally using VS2015, but saw that VS2017 should be used with SDK v5.0 (https://community.sdl.com/developers/language-developers/f/61/p/9856/37952#37952), so I am now using VS2017, but I still see the same issue.

 

I added log4net (v2.08) to the references, and now when I get to ProjectCreator.cs:50, I get a different error

Service 'Sdl.Desktop.Platform.Services.IUserSettingsService' could not be started.

Am now at a bit of a loss. Any ideas?

Cheers
Geoff