title: "ASP.global_asax does not exist in the namespace ASP"
body: <p>I created a RazorFunctions.cshtml file on App_Code</p>
  
  <pre><code>@functions {
      public static string GetActiveClassIf(string controllerName, string actionName = null)
      {
          var routeData = @HttpContext.Current.Request.RequestContext.RouteData;
          string currentController = routeData.Values["controller"].ToString();
          string currentAction = routeData.Values["action"].ToString();
          return controllerName == currentController &amp;&amp;
              (String.IsNullOrEmpty(actionName) || currentAction == actionName) ? "active" : "";
      }
  }
  </code></pre>
  
  <p>and when I compile, it give me 2 errors (compilation get success and site work without problem) but the errors are annoying.</p>
  
  <p>The RazorFunctions.cshtml are as Content (tried compile but doesn't work with cshtml files of course)</p>
  
  <p>Global.asax.cs is :</p>
  
  <pre><code>public class MvcApplication : System.Web.HttpApplication
  {
      protected void Application_Start()
      {
          AreaRegistration.RegisterAllAreas();
          ModelMetadataConfig.RegisterModelMetadata();
          FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
          RouteConfig.RegisterRoutes(RouteTable.Routes);
          BundleConfig.RegisterBundles(BundleTable.Bundles);
          Database.SetInitializer(new MigrateDatabaseToLatestVersion&lt;ApplicationDbContext, Configuration&gt;());
          //Database.SetInitializer(new DropCreateDatabaseAlways&lt;ApplicationDbContext&gt;());
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;%@ Application Codebehind="Global.asax.cs" Inherits="Bouron.Web.MvcApplication" Language="C#" %&gt;
  </code></pre>
  
  <p>This is the first time I use the App_Code so I don't know what else to do, all search returns ASP.NET 1-2 results, are out of date where razor doesn't even exist so I'm not sure how can I solve this.</p>
  
  <p>I'm using Visual Studio 2015 (just in case it matters)</p>