I have got a question with regards to upgrading mvc applications from v1 to v2...

I've noticed in the ASP.NET MVC v2 Release notes that we need to add this code (please see below) when upgrading, but it did not state what would be the purpose of it because I've tried experimenting some of my apps to mvc 2 without adding this particular section in web.config.

  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <assemblyIdentity name="System.Web.Mvc" 
      <bindingRedirect oldVersion="" newVersion=""/>

Would there be implications should I not place this?


Was it helpful?


What this code does is pretty much tells your entire project that if there happen to be any old leftover references to MVC 1.0, then it should instead go try and use the 2.0 version instead. And I believe this would be inherited by class libraries as well where you might forget to update references.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow