0

Currently i have glass mapper v3 and in process of upgrading to latest glass mapper i.e. v4, however when i build the project its giving me following error.

Severity Code Description Project File Line Suppression State Error CS1705 Assembly 'Glass.Mapper.Sc.Mvc' with identity 'Glass.Mapper.Sc.Mvc, Version=4.2.1.188, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc' with identity 'System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

CodeBox
  • 446
  • 4
  • 19

1 Answers1

0

Here is the table of support versions of MVC with Sitemap versions. 8.1 and 8.2 support 5.2 MVC.

https://kb.sitecore.net/articles/087164

The latest glass mapper may not work with the older versions of Sitecore.

You can upgrade your MVC to 5.2 and add bindings to your web.config to make requests to 5.1 work on 5.2.

 <dependentAssembly>
    <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
  </dependentAssembly>
Chris Auer
  • 1,405
  • 12
  • 23