title: MasterPage Code File the 'inherits' attribute error - ASP.NET
body: <p>I have recently taken over support for an application for a developer who has left our company that use the standard template provided for all of our developers.</p>
  
  <p>When I try to build the application, I get the following error:</p>
  
  <blockquote>
    <p>Make sure that the class defined in this code file matches the
    'inherits' attribute, and that it extends the correct base class (e.g.
    Page or UserControl).</p>
  </blockquote>
  
  <p>Here is the source code that is causing the error:</p>
  
  <p>MasterPage mark up</p>
  
  <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeFile="AppStatic.master.cs" Inherits="AppStatic" %&gt;
  </code></pre>
  
  <p>Code behind:</p>
  
  <pre><code>public partial class AppStatic : System.Web.UI.MasterPage
  </code></pre>
  
  <p>I have Googled this error message and the solution to to verify the <code>Inherits</code> matches that <code>CodeFile</code> class name.</p>