What is the meaning/reason for the generated entries in web.config>configuration>runtime>assemblyBinding?

前端 未结 1 948
自闭症患者
自闭症患者 2021-02-04 23:44

I\'ve noticed this section in my web.config files for a while and I\'m now trying to reason out what exactly the purpose is:

  
    

        
1条回答
  •  野的像风
    2021-02-05 00:18

    Does this mean if I have a web project that depends on a class library and that class library has a reference to an older version of the assembly which has a a bindingRedirect, that the code will execute as if it were compiled against the newer version?

    You have it right (I would just say "...the code will execute as if it were referencing the newer version"), see http://msdn.microsoft.com/en-us/library/7wd6ex19%28v=vs.110%29.aspx

    "When you build a .NET Framework application against a specific version of a strong-named assembly, the application uses that version of the assembly at run time. However, sometimes you might want the application to run against a newer version of an assembly."

    0 讨论(0)
提交回复
热议问题