Я использую RazorEngine для визуализации некоторого базового контента (очень грубой системы управления контентом).
Он отлично работает, пока я не включу какой-либо синтаксис @Html в разметку.
Если разметка содержит @html, я получаю следующую ошибку:
Невозможно скомпилировать шаблон. Имя "Html" не существует в текущий контекст
Это представление, которое отображает разметку:
@Model Models.ContentPage
@{
ViewBag.Title = Model.MetaTitle;
Layout = "~/Views/Shared/Templates/_" + Model.Layout + "Layout.cshtml";
}
@Html.Raw(RazorEngine.Razor.Parse(Model.Markup, Model))
Я видел на сайте Codeplex для RazorEngine использование @Html (я знаю, что версия устарела и Я получил свою версию через nuget).
Любая помощь по этому поводу была бы большой.