C#程序集重定向
发布时间:2020-12-15 22:50:14 所属栏目:百科 来源:网络整理
导读:我正在使用Oracle.DataAccess,并且需要访问较旧的数据库,这意味着我需要使用此程序集的旧版本.新旧程序集都在GAC中,但我似乎无法让应用程序使用旧版本.这是我的.config文件: configuration runtime assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v
我正在使用Oracle.DataAccess,并且需要访问较旧的数据库,这意味着我需要使用此程序集的旧版本.新旧程序集都在GAC中,但我似乎无法让应用程序使用旧版本.这是我的.config文件:
<configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342"/> <bindingRedirect oldVersion="2.121.1.0" newVersion="2.112.3.0"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration> 什么都没有显示(没有任何东西,完全是空的),但我对这个工具并不太熟悉,所以也许我使用那个错误(也是). 有任何想法吗? 解决方法
您的配置文件看起来正确.但我会将旧版本改为此版本
0.0.0.0-2.999.9.0.因为那时您并不关心Oracle dll的实际版本是什么,而新版本是您想要使用的正确(旧)版本. 现在你确定这是正确的版本吗? Oracle.DataAccess的第2版非常古老. <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342"/> <bindingRedirect oldVersion="0.0.0.0-2.999.9.0" newVersion="2.112.3.0"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration> 以下是来自MS的更多信息 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |