Hi Everyone
Yesterday Arpana reported an error using Glass.Mapper in Sitecore 7.1. After some investigation it turned out that this problem was caused because Glass.Mapper was compiled against the MVC3 assemblies and the binding redirects trick wasn't enough to solve the problem of getting Glass.Mapper working with MVC4.
I have a solution which is that I create two builds of Glass.Mapper, the first uses .Net 4 and MVC 3, the second uses .Net 4.5 and MVC 4.
The .Net 4 versions can be used with all Sitecore releases pre 7.1 and the .Net 4.5 version can be used with Sitecore 7.1. You won't have to worry about which to download from Nuget because both versions are contained in the same Nuget package and Nuget sorts out which to install based on the project configuration.
However this creates a problem for anyone who is using Glass + Sitecore pre 7.1 + Net 4.5. When you download the Nuget package Nuget will try to install the .Net 4.5 versions which points at MVC4. This will then give you a compile error because your solution reference MVC3. You can manually change the references but this is still a pain.
How many people would this affect? Does anyone know of a better solution?
Mike