title: Layout does not exist in the current context
body: <p>I'm trying to include the layout in one of my views and it's saying it doesn't exist in current context along with viewbag.</p>
  
  <pre><code>@{
  ViewBag.Title = "About Me";
  Layout = "~/Views/Shared/_Layout.cshtml";}
  </code></pre>
  
  <p>I've looked at other solutions saying I need this or that in the web.config, though nothing has worked.</p>
  
  <p>I'm on Mac OS and using Visual Studio for Mac Community</p>
  
  <p>views/web.config:</p>
  
  <pre><code>&lt;configuration&gt;
   &lt;configSections&gt;
       &lt;sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt;
           &lt;section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /&gt;
           &lt;section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /&gt;
       &lt;/sectionGroup&gt;
   &lt;/configSections&gt;
   &lt;system.web.webPages.razor&gt;
       &lt;host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
       &lt;pages pageBaseType="System.Web.Mvc.WebViewPage"&gt;
           &lt;namespaces&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="GroundRoots" /&gt;
           &lt;/namespaces&gt;
       &lt;/pages&gt;
   &lt;/system.web.webPages.razor&gt;
   &lt;appSettings&gt;
       &lt;add key="webpages:Enabled" value="false" /&gt;
   &lt;/appSettings&gt;
   &lt;system.webServer&gt;
       &lt;handlers&gt;
           &lt;remove name="BlockViewHandler" /&gt;
           &lt;add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /&gt;
       &lt;/handlers&gt;
   &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>root web.config:</p>
  
  <pre><code>&lt;!--
  Web.config file for GroundRoots.
  
  The settings that can be used in this file are documented at 
  http://www.mono-project.com/Config_system.web and 
  http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
  --&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5"&gt;
        &lt;assemblies /&gt;
      &lt;/compilation&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
    &lt;/system.web&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  
  &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
        &lt;remove name="OPTIONSVerbHandler" /&gt;
        &lt;remove name="TRACEVerbHandler" /&gt;
        &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;&lt;/configuration&gt;
  </code></pre>
  
  <p>Not really sure where to go from here...</p>