jeudi 26 octobre 2017

Unable to load library using ReflectionOnlyLoadFrom

Well... I ´m having a problem with an 3rd party application that needs to connect to an Oracle Database. The problem is that 'Oracle.DataAccess' library is not being able to load.

The manufacturer told me to run the following command in powershell:

$path="D:\oracle\product\11.2.0\client_1\odp.net\bin\4\Oracle.DataAccess.dll"
[Reflection.Assembly]::ReflectionOnlyLoadFrom($path).ImageRuntimeVersion

And that is supposed to return the framework version that is being used. That does not work and throws the following message:

Exception calling "ReflectionOnlyLoadFrom" with "1" argument(s): "Could not loa d file or assembly 'http://file/D:\oracle\product\11.2.0\client_1\odp.net\bin\4\Ora cle.DataAccess.dll' or one of its dependencies. This assembly is built by a run time newer than the currently loaded runtime and cannot be loaded." At line:1 char:46
+ [Reflection.Assembly]::ReflectionOnlyLoadFrom <<<< ($path).ImageRuntimeVersio n
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

This server is running W2008 Server R2. The weird thing is that on another machine I have running W2012 Server the thing works just fine. I´ve already installed and repair all possible .net framework versions.

Can someone help me on this one?.





Aucun commentaire:

Enregistrer un commentaire