I am writing a plugin for Nop Commerce and my HTML helpers are giving me intellisense errors. I get red lines underlining them and the errors:
Feature 'extension method' cannot be used because it is not part of the ISO-2 C# language specification
Feature 'lambda expression' cannot be used because it is not part of the ISO-2 C# language specification
Here is my code:
@{
Layout = "";
}
@model Nop.Plugin.Widgets.HelloWorld.Models.ConfigurationModel
@using Nop.Web.Framework;
@Html.Action("StoreScopeConfiguration", "Setting", new { area = "Admin" })
@using (Html.BeginForm())
{
<fieldset>
<legend><strong>Hello World Configuration</strong></legend>
<table class="adminContent">
<tr>
<td class="adminTitle">
@Html.OverrideStoreCheckboxFor(model => model.Greeting_OverrideForStore, model => model.Greeting, Model.ActiveStoreScopeConfiguration)
@Html.NopLabelFor(model => model.Greeting):
</td>
<td class="adminData">
@Html.EditorFor(model => model.Greeting)
@Html.ValidationMessageFor(model => model.Greeting)
</td>
</tr>
<tr>
<td class="adminTitle">
@Html.OverrideStoreCheckboxFor(model => model.Name_OverrideForStore, model => model.Name, Model.ActiveStoreScopeConfiguration)
@Html.NopLabelFor(model => model.Name):
</td>
<td class="adminData">
@Html.EditorFor(model => model.Name)
@Html.ValidationMessageFor(model => model.Name)
</td>
</tr>
</table>
</fieldset>
<br />
<table class="adminContent">
<tr>
<td colspan="2">
<input type="submit" name="save" class="k-button" value="@T("Admin.Common.Save")" />
</td>
</tr>
</table>
}
My screen looks like:
I've looked for hours for the answer but haven't found one that actually works. The project is a code library and is on ASP.NET 4.5.1 like the rest of the solution. There are no errors when I build. Am I missing a reference or a using statement? I'm not sure what is going on.