title: Where is index.g.cshtml
body: <p>I am trying to work through this tutorial, <a href="https://docs.microsoft.com/en-us/aspnet/core/data/ef-rp/intro?view=aspnetcore-2.1&amp;tabs=visual-studio" rel="nofollow noreferrer">ASP.Net Core Razor Pages</a>, but (often) when I build the solution, I get a <code>CS0234</code> error stating that a namespace is missing from file <code>Index.g.cshtml.cd</code>, but where does this file exist?</p>
  <p>I have tried</p>
  <ol>
  <li>All the build/clean/rebuild solution options.</li>
  <li>I have restarted Visual Studio</li>
  <li>I have deleted the DEBUG files and restarted VS and FINALLY</li>
  <li>I have restarted my PC.
  The ONLY solution that seems to work, is to delete the entire solution/project and start again.</li>
  </ol>
  <p>Surely there must be a fix for this?
  Can you assist?</p>