剃刀2(其中附带MVC4)似乎并没有与剃刀1(从MVC3)完全向后兼容。
Razor 2 (which ships with MVC4) doesn't seem to be fully backwards compatible with Razor 1 (from MVC3).
由于升级换代,我发现了一个错误:
Since upgrading, I found an error:
在td@Html.Raw(伯爵元素没有被封闭,所有的元素必须是自闭或有一个匹配的结束标记。
The "td@Html.Raw(count" element was not closed. All elements must be either self-closing or have a matching end tag.
这引起了code,这是:
The code that caused this was:
<td@Html.Raw(count == null ? null : " class='has-item'")>
该解决方案是什么呢?
What is the solution to this?
剃刀分析程序重新编写的MVC 4的