'Oracle.DataAccess, Version=2.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies

0

I have a web project built in Visual Studio 2012. Its using the Oracle.DataAccess.dll Now the one I see in my solution is 4.121 version. But am receiving this error where the project is looking for 2.122 version. Thanks for your help in advance

Below is the stack trace

=== Pre-bind state information === LOG: DisplayName = Oracle.DataAccess, Version=2.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342 (Fully-specified) LOG: Appbase = file:///C:/TFS/IVAS/CPTSBaselineCode/FrontEndApplications/CampaignPerformanceTracking/CampaignPerformanceTracking/ LOG: Initial PrivatePath = C:\TFS\IVAS\CPTSBaselineCode\FrontEndApplications\CampaignPerformanceTracking\CampaignPerformanceTracking\bin Calling assembly : Aarp.Cpts.DataObjects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\TFS\IVAS\CPTSBaselineCode\FrontEndApplications\CampaignPerformanceTracking\CampaignPerformanceTracking\web.config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Oracle.DataAccess, Version=2.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342 LOG: Attempting download of new URL file:///C:/Users/XXX/AppData/Local/Temp/1/Temporary ASP.NET Files/vs/ecf130a4/7d736bb0/Oracle.DataAccess.DLL. LOG: Attempting download of new URL file:///C:/Users/XXX/AppData/Local/Temp/1/Temporary ASP.NET Files/vs/ecf130a4/7d736bb0/Oracle.DataAccess/Oracle.DataAccess.DLL. LOG: Attempting download of new URL file:///C:/TFS/IVAS/CPTSBaselineCode/FrontEndApplications/CampaignPerformanceTracking/CampaignPerformanceTracking/bin/Oracle.DataAccess.DLL. WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Stack Trace:

[FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=2.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
CampaignPerformanceTracking.JobSearch..ctor() in c:\TFS\IVAS\CPTSBaselineCode\FrontEndApplications\CampaignPerformanceTracking\CampaignPerformanceTracking\JobSearch.aspx.cs:25 ASP.jobsearch_aspx..ctor() in c:\Users\XXX\AppData\Local\Temp\1\Temporary ASP.NET Files\vs\ecf130a4\7d736bb0\App_Web_xghf0hzg.3.cs:0
__ASP.FastObjectFactory_app_web_xghf0hzg.Create_ASP_jobsearch_aspx() in c:\Users\XXX\AppData\Local\Temp\1\Temporary ASP.NET Files\vs\ecf130a4\7d736bb0\App_Web_xghf0hzg.4.cs:0
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +31
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +100
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +64
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +191
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +156 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159

oracle
visual-studio-2012
x86
64bit
processor
asked on Stack Overflow Jan 24, 2019 by GSR • edited Jan 24, 2019 by Wernfried Domscheit

1 Answer

0

It is a bit difficult to help you if we see only the error message and nothing else. Some points:

  • Which version of .NET framework did you set in your compile options? If you set 3.5 or lower then your application tries to load Oracle.DataAccess.dll 2.xxx. If you set 4.0 or higher then Oracle.DataAccess.dll 4.xxx will be loaded.

  • The architecture (i.e. 32-bit or 64-bit) of Oracle.DataAccess.dll must be the same as the architecture if your application

  • Did you install Oracle.DataAccess.dll (Oracle Data Provider for .NET)? - it is not included in Oracle Instant Client by default.

  • Version of Oracle.DataAccess.dll must be exactly the same version as your Oracle Client

  • Oracle installer 12.1 or newer does not add Oracle.DataAccess.dll to GAC. You must add it manually.

answered on Stack Overflow Jan 24, 2019 by Wernfried Domscheit

User contributions licensed under CC BY-SA 3.0