问题描述
我想使用玻璃映射在我的MVC - 在Sitecore的v4.0.30319项目 - 7.1
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
- 玻璃映射器版本 - 3.0.10.23
- Glass.Mapper.Sc版本 - 3.2.0.39
- Glass.Mapper.Sc.Mvc版本 - 3.2.0.34
- >文件夹包含
该文件的内容如下:
<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)
无法解析类型名称:
Glass.Mapper.Sc.Pipelines.Response.GetModel,Glass.Mapper.Sc(方法:
Sitecore.Configuration.Factory.CreateType(XmlNode的configNode,字符串[]
参数,布尔断言))
但参考已经存在?
我缺少的步骤?可能有人请帮助。
Am I missing any steps? Could someone please help.
推荐答案
玻璃映射器的开发者最近提出了一些类到一个单独的MVC组件并没有改变配置文件。这无法加载此类现在是在 Glass.Mapper.Sc.Mvc
组装,所以你的配置应该是这样的:
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>
这篇关于无法解析类型名称:Glass.Mapper.Sc.Pipelines.Response.GetModel,Glass.Mapper.Sc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!