Sample code of batch analysis raises error message

Hi all,

Maybe this is a stupid question. So take my apologies if this has already been answered.

I tried out the new Studio 2014 SDK together with Visual Studio 2013 and tried to rewrite the C# sample code for batch analysis in VB.

Unfortunately I cannot open a TM with the FileBasedTranslationMemory(tmFile)  feature.

The error message reads {"file or assembly "Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" or dependecy not found. Tried to load file of a wrong format."} (the message was in German, I tried my best to translate it.)

Tried the same with the original C# code from the example and the error message is identical. As I have just started with both Visual Studio 2013 and the 2014 SDK I might be missing something fundamental. Is someone out there who can push me into the right direction?

Thanks in advance,

Daniel

  • Hi Daniel,

    you need to add this line to your yourappname.exe.config file, as part of the translation memory API seems to be depending on .NET 2:

    <startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>

    Hope that helps,

    Cheers

    Tom

  • Hi Daniel,

    you need to add this line to your yourappname.exe.config file, as part of the translation memory API seems to be depending on .NET 2:

    <startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>

    Hope that helps,

    Cheers

    Tom

  • Hi Tom,

    Thanks for the hint. It was not exactly the solution but it pushed me into the right direction. If you leave out your suggested configuration line, the programme will produce a slightly different message, telling you in detail that you tried to use a 2.0 function in a 4.0 environment. My problem was that I had selected "any CPU" and the application can only run in 32 bit mode. But again - your supplement is definetely needed, too.

    So thanks again and best regards,

    Daniel