0

Glass.Mapper.Sc has an assembly for each version of Sitecore.Kernel (located in the lib folder of the nuget package).

We are building a library which should be usable for different versions of Sitecore (7.2 and 8.1) and I would like not having to create a version of my library for each Sitecore version.

Is safe to just use the 7.2 version of Glass.Mapper.Sc for 8.1?

All we are doing is using basic Sitecore API which to my knowledge hasn't changed between 7.2 and 8.1.

Mark Lowe
  • 1,056
  • 8
  • 16
  • Just did a quick test and it basically worked. Then decompiled the 8.1 and 7.2 assemblies and compared. There are some differences in the SitecoreFieldLinkMapper.cs and SitecoreFieldDateTimeMapper.cs which problably means these fields won't work correctly. Leading me to the conclusion that it's not safe to just use the 7.2 DLL versions for 8.1 – Mark Lowe Nov 25 '15 at 17:40

2 Answers2

1

I guess it will not work. Glassmapper for Sitecore 8 didn't work for Sitecore 8.1 Glass Mapper is using System.Web.Mvc.dll that was changed in version 8.1 (Mvc 5.2.3) and Glass Mapper used before Mvc version 5.1

Here is the related issue : https://github.com/mikeedwards83/Glass.Mapper/issues/183

Vlad Iobagiu
  • 4,118
  • 3
  • 13
  • 22
  • The issue in the link is related to the install script, not the assemblies themselves. But you are right about it not working. – Mark Lowe Nov 25 '15 at 17:40
0

Glass mapper assemblies uses these dlls

  • Sitecore.Kernel.dll
  • System.Web.Mvc.dll

These assemblies are used to determine which version of the Glass.Mapper assemblies should be referenced, once you install it.

Glass.Mapper.Sc for Sitecore 7.2 needs diffrent assemblies than Glass.Mapper.Sc for Sitecore 8, So this will not work.

Ahmad Harb
  • 605
  • 3
  • 17