I loaded an existing project, and it can be built. But I got such a warning:
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.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86", "x86". 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.
I re-referenced the Orcl.DataAccess but the error still exists. Any idea for this bug? Thanks.
Solved! Go to Solution.
This warning is raised when you add a library reference to your project that is not compatible with your current project platform.
In your case: You have a project which is configurated to be compiled as "MSIL" - that means that your library is platform agnostic: It can be loaded into a 32bit process (x86) as well as into a 64bit process without the need to recompile it. You now added a reference to a oracle library that is only available to 32bit (Processor Architecture is 'x86'). That causes a mismatch, since it doesn't make sense anymore to compile your project to "MSIL": Your dependency to that oracle library causes that your the process that consumes your library has to be a 32bit process only. A 64bit process is not capable any longer to consume your library because of that oracle dependency.
To solve that issue: Unless there exists an appropriate MSIL oracle library you have to switch either to x86 or to x64 for your library.
This warning is raised when you add a library reference to your project that is not compatible with your current project platform.
In your case: You have a project which is configurated to be compiled as "MSIL" - that means that your library is platform agnostic: It can be loaded into a 32bit process (x86) as well as into a 64bit process without the need to recompile it. You now added a reference to a oracle library that is only available to 32bit (Processor Architecture is 'x86'). That causes a mismatch, since it doesn't make sense anymore to compile your project to "MSIL": Your dependency to that oracle library causes that your the process that consumes your library has to be a 32bit process only. A 64bit process is not capable any longer to consume your library because of that oracle dependency.
To solve that issue: Unless there exists an appropriate MSIL oracle library you have to switch either to x86 or to x64 for your library.
Karl: You are right. I have solved this issue like you said. I set Platform target: x64, and then loaded the x64 Oracle.DataAccess. Then, the warning is gone, and I could execute the AddIn tool on ArcMap. Thanks again.