I am trying to use Glass Mapper in my MVC - v4.0.30319 project in Sitecore - 7.1.
Following are my Glass Mapper version which I have installed
when I installed Glass mapper Mvc from nuget it added a config file called (Glass.Mapper.Sc.Mvc) in App_Config -> include folder
Content of the file is as follows
<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>
Now when I run my website, it gives me below error (when running the pipeline mentioned in the above config)
Could not resolve type name: Glass.Mapper.Sc.Pipelines.Response.GetModel, Glass.Mapper.Sc (method: Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert))
but the reference is already there?
Am I missing any steps? Could someone please help.
The developer of Glass Mapper has recently moved some classes to a separate MVC assembly and did not change the config file. The class which could not be loaded is now in the Glass.Mapper.Sc.Mvc
assembly, so your config should look like this:
<mvc.getModel>
<processor type="Glass.Mapper.Sc.Pipelines.Response.GetModel, Glass.Mapper.Sc.Mvc"/>
</mvc.getModel>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With