How to Make ODP.NET 4.0 (64 bit) working on 64 bit machine Windows 7?

后端 未结 2 1753
南笙
南笙 2021-02-11 05:28

I have installed the Oracle Client for the 64 bit machine using the XCopy 11.2 provided by Oracle (Installed everything as per the read me instructions).

I am using Visu

2条回答
  •  既然无缘
    2021-02-11 05:57

    The best possibility to handle this is to use the x86 version locally with Visual Studio and x64 version on the server with IIS. To do this you have to download both versions - copy one in folder lib\x86 and the other in lib\x64 After this you have to modify the project file(s) - visual studio supports conditional references. Add following section to your project file:

    
         ..\Lib\x86
         ..\Lib\x64
    
    

    After this reference the odp.net assmebly like this:

    
       False
       $(ReferencesPath)\Oracle.DataAccess.dll
       True
    
    

    This way when you can build locally as x86 and on the server x64 and always the correct version of Oracle.DataAccess.dll will be referenced.

    Alternatively if you only want to use the x64 version than you have to stick to IIS even you work locally OR you could try to run the open source version of Cassini in x64 mode (http://cassinidev.codeplex.com).

    For me the best possibility is to reference both versions as described above - this has been working fine for everyone on my team for a while now.

提交回复
热议问题