0
votes

When I try to test an application built on vs 2008 using unit test built on 2012 I am getting the following error:

I tried to add assembly redirects for version 2.0 both on the machine config and my local computer :

This is the source of error: Please provide a suggestion.

=== Pre-bind state information === LOG: DisplayName = System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (Fully-specified) LOG: Appbase = %test application path% LOG: Initial PrivatePath = NULL

Calling assembly : %application under test%, Version=4.4.0.22, Culture=neutral, PublicKeyToken=null.

LOG: This bind starts in default load context. LOG: Using application configuration file: test application path LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.

LOG: Version redirect found in framework config: 2.0.0.0 redirected to 4.0.0.0.

LOG: Post-policy reference: System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 LOG: Attempting download of new URL file:testapplication/bin/Debug/System.Data.OracleClient.DLL. LOG: Attempting download of new URL file:testapplication/bin/Debug/System.Data.OracleClient.DLLL. LOG: Attempting download of new URL file:testapplication/bin/Debug/System.Data.OracleClient.DLL LOG: Attempting download of new URL file:testapplication/bin/Debug/System.Data.OracleClient.DLL

1

1 Answers

0
votes

I couuld found out what is the reason , for version redirects

1)application.config file takes precedence over the machine.config file.

so if we put version redirects on the app.config for the system.data.oracleclient with old verison as 2.0 and new version as 4.0 and include the 4.0 dll either on the project bin directory or a separate build directory.

the app.config redirects all calls without any issues.