'System.BadImageFormatException: Could not load file or assembly' when Running Tests Inside Visual Studio (Doc ID 1309925.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Data Provider for .NET - Version: 10.2.0.3.02 and later   [Release: and later ]
Microsoft Windows x64 (64-bit)
Visual Studio 2008

Symptoms

The Visual Studio 2008 application works when the run-time executable is launched.  But, when the Visual Studio Test menu is used to run tests against the application the following error occurs:

System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies.

An attempt was made to load a program with an incorrect format.

The application is using 64-bit Oracle Client Software and a 64-bit interface such as the Oracle Data Provider for .NET (ODP.NET).

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms