Could not load file or assembly 'Oracle.DataAccessVersion=9.2.0.700, Culture=neutral, PublicKeyToken=89b483f429c47342'

我与影子孤独终老i 提交于 2019-12-10 15:53:29

问题


Could not load file or assembly 'Oracle.DataAccess, Version=9.2.0.700, 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)

i have developed the application using odac 32 bit version 11.2.0.3.0. where it is working absolutely fine.But deploying into another pc where i installed IIS 7.5 with 32 bit client ersion 11.2.0.3.0 i am always getting the above error.

i have no idea where it is getting oracle.DataAccess, Version=9.2.0.700. I tried whole day to solve the issue. But still no luck. Please help me out of the situation where i am really feeling pathetic.


回答1:


goto this address and read answer: Could not load file or assembly after upgrading DevExpress

In the solutionExplorer: switched to the File View and changed

CopyLocal = true 

for all DevExpress assemblies both in the Server and ServerGenerated projects. It resolves the issue for me. Could you please try it and let me know if that helps?




回答2:


i finally got the solution. I just need to redirect the assembly to the current one in the web.config file as below :

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
 <dependentAssembly>
  <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342"   culture="neutral"/>
<bindingRedirect oldVersion="9.2.0.700" newVersion="4.112.3.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

Thank you all for your kind co-operation and know what feeling big relief.




回答3:


If you are using ODP.Net check assembly version in gac and which platform it is targeted.You can find that information by opening command prompt from visual studio tools and using the following command

gacutil /l oracle.dataaccess

If the processor architecture is x86 then make sure that your application pool is allowed to run 32 bit version of the assembly.This can be done by right clicking on the respective

   application pool->advanced settings->Enable 32 bit Application to true.



回答4:


Perhaps you are referencing a dll that is referencing this other version, even though the immediate project is not? Make sure you check there references on all of the dlls.




回答5:


The version and the runtime version are not likely the same, that has messed me up before.

As for the reference, select the reference to Oracle.DataAccess in Solution Explorer on the machine where the project works. Now look at the properties window and check the path.

Finally, go to the machine where it is failing and make sure the same dll is living at the exact same path.

You may also be able to get around this with turning "copy local" on in the properties for the dll, but I don't think that is considered "best practice".



来源:https://stackoverflow.com/questions/10501896/could-not-load-file-or-assembly-oracle-dataaccessversion-9-2-0-700-culture-neu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!