0

I am developing an single page web application that uses the Oracle.DataAccess dll. When I run the application locally I have to use the 32-bit version for IIS express. When I publish my application, IIS requires that I use the 64-bit version.

I was wondering if there was a way to change which version was included in the references depending if I run it locally vs. publishing it without having to manually change the dll each time before building.

I am currently developing in Visual Studio 2013 Update 3.

2 Answers2

0

Do you use a separate build configuration when deploying vs running locally? If so, you can use the Condition attribute of a Reference to conditionally evaluate it based on the current build configuration like so:

<Reference Include="32 bit Oracle.DataAccess" Condition="'$(Configuration)' == 'LocalBuild'" />
<Reference Include="64 bit Oracle.DataAccess" Condition="'$(Configuration)' == 'MyDeploymentBuild'" />
user1620220
  • 1,295
  • 8
  • 15
0

You can install both x64 and x86 Oracle version on one machine, see here: Install both x86 (32-bit) and x64 Oracle Clients on your machine. Then you can compile your application in either ways without any changes. Just copy the correct version of Oracle.DataAccess.dll to your target system.

Community
  • 1
  • 1
Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110