Domanda

I have just written a console app running a query and writing the result set to a file. The Programme is written in c# in VS 2008. And I used the Oracle.DataAccess.dll.

The programme runs well locally on VS 2008. But when I try to publish the following warnig is shown.

What does this mean?

Warning 1   Referenced assembly '..\..\..\..\..\..\..\Oracle\product\11.2.0\client_2\ODP.NET\bin\2.x\Oracle.DataAccess.dll' targets a different processor than the application. TestOracle

Thanks

È stato utile?

Soluzione

It means that either your application is 32-bit and you are using the 64-bit ODAC components, or that your application is 64-bit and you are using the 32-bit (x86) ODAC components.

To expand further: If your're building on a 64-bit machine, and are compiling for Any CPU, then the app will run as 64-bit, and if Oracle.DataAccess is 32-bit, then you'll get this error.

Correspondingly, if you're building on a 32-bit machine, and Oracle.DataAccess is 64-bit, you'll get this error.

Either way, make sure what version (32-bit/64-bit) of Oracle.DataAccess you are using, then set your project build options accordingly. You might need to add a new configuration for 'x86' using the Configuration Manager.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top