I'm building my project UnitTest vbproj on Visual Studio 2017 Professional. When I build with "Any CPU", there is one warning:
warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
Then I run my test case, all of them are failed. One of error of test case is:
Message: Test method [name of method] threw exception:
System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.
So I change to platform x64 -> there are 45 errors and 8 warning because it's not fit with my project. Then I change to platform x86 -> I received same error with platform x84.
What should I do now? I tried to fix this by many methods but can't.