Today I was trying to use Sitecore Glass Mapping framework for my Sitecore MVC project. I’ve installed Glass Mapper from nuget and configured it for Sitecore MVC project. For more information on the Glass.Sitecore.Mapper visit the official website. Below are the few details about my development environment:
While troubleshooting; I’ve checked Glass.Mapper.Sc.Mvc.config file.
Comments and suggestions are most welcome. Happy coding!
- MVC Version: 4
- Sitecore Version: 7.0
- Glass.Mapper version: 3.0.10.23
- Glass.Mapper.Sc version: 3.2.0.39
- Glass.Mapper.Sc.Mvc version: 3.2.0.35
- Glass.Mapper.Sc.Razor version: 3.0.9.13
- Glass.Mapper.Sc.Razor.config
- Glass.Mapper.Sc.Mvc.config
While troubleshooting; I’ve checked Glass.Mapper.Sc.Mvc.config file.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <settings></settings> <pipelines> <mvc.getModel> <processor type="Glass.Mapper.Sc.Pipelines.Response.GetModel, Glass.Mapper.Sc"/> </mvc.getModel> </pipelines> </sitecore> </configuration>I’ve checked Glass Mapper official website and got to know that few classes have been move to separate MVC assembly and somehow changes were not getting reflected into .config file. Class Glass.Mapper.Sc.Pipelines.Response.GetModel has been moved to Glass.Mapper.Sc.Mvc assembly which was earlier in Glass.Mapper.Sc assembly. I’d modified Glass.Mapper.Sc.Mvc.config as below:
<sitecore> <settings></settings> <pipelines> <mvc.getModel> <processor type="Glass.Mapper.Sc.Pipelines.Response.GetModel, Glass.Mapper.Sc.Mvc"/> </mvc.getModel> </pipelines> </sitecore> </configuration>I rebuild the solution and I was no longer getting the error.
Comments and suggestions are most welcome. Happy coding!
Hi
ReplyDeleteThanks for blogging this bug. This should be fixed if you are installing into a new project but it is a problem if you are upgrading an existing project.
Mike
Great. Thanks Mike. :)
ReplyDeleteASP.NET training in Jaipur provides quality training with live projects. Learn on web designing and development with error solving tricks.
ReplyDeleteNice blog on bug. Training give you way to learn and resolve error solving technique.
ReplyDeleteLive project training in Jaipur