Featured post
c# - Using Oracle.DataAccess.DLL already on PC, not providing it -
i looking make program more dynamic. able support oracle 10g , oracle 11g database same program. if build program using .dll reference 1 version other fails. there way use oracle.dataaccess.dll on computer being installed upon, instead of providing dll in installer?
thanks in advance.
specificversion attribute applies during build time. designed assist if there multiple versions of assembly in build environment; when specificversion true, ensure build against , reference desired version. once target assembly built, however, references contain strong name , version number of referenced assembly. so, if specificversion false, it's going set reference whatever available version of reference in build environment @ time.
"note specific version property build-time directive, , has no effect on runtime version resolution of referenced assembly" (http://www.code-magazine.com/article.aspx?quickid=0507041&page=3).
however, use version redirection explicitly annotate accept version. oldversion field specifies (the version built against), , newversion attribute specify 1 want link against @ runtime.
<dependentassembly> <assemblyidentity name="oracle.dataaccess" publickeytoken="89b483f429c47342"/> <bindingredirect oldversion="1.0.0.0-2.111.9999.9999" newversion="2.102.2.20"/> </dependentassembly>
(see http://msdn.microsoft.com/en-us/library/7wd6ex19.aspx.)
that dependentassembly node can applied different contexts. 1 possible context in web.config or app.config child of configuration/runtime/assemblybinding node.
to answer particular scenario of supporting both oracle 10g , 11g? there 2 options, former of suggested user @bq:
- deploy 1 version of odp.net. should able talk both versions of database server (10g , 11g) either version of odp.net (10g or 11g). see @bq's answer below.
- if need able link 2 different assembly versions, need have 2 different version redirection configurations. in other words, you'd need 2 app.config files, 1 of contains version redirection 10g odp.net version , other 11g odp.net version.
a few more tips:
- make sure remove oracle-provided publisher policies gac. these take precedence on ones in web/app.config
- by default, binding failures cached, if odp.net assembly happened fail binding version redirection, you'll need restart iis purge cached failures.
- Get link
- X
- Other Apps
Comments
Post a Comment