title: Validation.RequireField:CS0117: 'System.Web.Helpers.Validation' does not contain a definition for 'RequireField'
body: <p>i create an mvc4 webpage2 razor web project and when i use Validation.RequireField it gives me this error but when i create new website it works fine.i get confused what is the problem????</p>
  
  <p><strong>CS0117: 'System.Web.Helpers.Validation' does not contain a definition for 'RequireField'</strong></p>
  
  <pre><code>@model   Common.UsersManagement.Extensions.LoginModel
  @{
      Validation.RequireField("title", "You must enter a title");
  
  }
  </code></pre>
  
  <p>this my web config</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;connectionStrings&gt;
      &lt;add name="DefaultConnection" connectionString="Data Source=localhost;Initial Catalog=NaturalEnvironment;Integrated Security=True;" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="2.0.0.0" /&gt;
      &lt;add key="webpages:Enabled" value="true" /&gt;
      &lt;add key="PreserveLoginUrl" value="true" /&gt;
      &lt;add key="ClientValidationEnabled" value="true" /&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
    &lt;/appSettings&gt;
    &lt;system.web&gt;
      &lt;customErrors mode="Off" defaultRedirect="~/Shared/ErrorPage"&gt;
      &lt;/customErrors&gt;
      &lt;sessionState timeout="20"&gt;&lt;/sessionState&gt;
      &lt;compilation debug="true" targetFramework="4.0" /&gt;
      &lt;pages&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Helpers" /&gt;
          &lt;add namespace="System.Web.Mvc" /&gt;
          &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
          &lt;add namespace="System.Web.Mvc.Html" /&gt;
          &lt;add namespace="System.Web.Routing" /&gt;
          &lt;add namespace="System.Web.WebPages" /&gt;
        &lt;/namespaces&gt;
      &lt;/pages&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
      &lt;handlers&gt;
        &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /&gt;
        &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /&gt;
        &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
        &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /&gt;
        &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /&gt;
        &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>this my packages</p>
  
  <pre><code>&lt;packages&gt;
    &lt;package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net40" /&gt;
    &lt;package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net40" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi" version="4.0.20710.0" targetFramework="net40"/&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Client" version="4.0.20710.0"   targetFramework="net40" /&gt;
        &lt;package id="Microsoft.AspNet.WebApi.Core" version="4.0.20710.0" targetFramework="net40" /&gt;
        &lt;package id="Microsoft.AspNet.WebApi.WebHost" version="4.0.20710.0" targetFramework="net40" /&gt;
        &lt;package id="Microsoft.AspNet.WebPages" version="2.0.30506.0" targetFramework="net40" /&gt;
        &lt;package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net40" /&gt;
        &lt;package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" /&gt;
        &lt;package id="Newtonsoft.Json" version="4.5.6" targetFramework="net40" /&gt;
      &lt;/packages&gt;
  </code></pre>