I was trying to use the following statement:
@Html.Test().Nand()
However, Razor is choking at the < before the ISQL.
Any
I just found this question when I was looking for this "same error" when upgrading mvc.
I had :
Does not work:
@{
ViewBag.Title = "Something " + @Model.Title;
var something = (IEnumerable)ViewBag.Options;
}
Apparently, the syntax went stricter, and as you are inside a @{} block, you should not add @ before Model.Title on the example. But the error on the code editor was pointing to the generic and it was getting me crazy.
It works fine if there is no <> inside the code, but just removing the @ from Model.Title fix the issue.
Works:
@{
ViewBag.Title = "Something " + Model.Title;
var something = (IEnumerable)ViewBag.Options;
}
Hope this helps to anyone