title: The type or namespace name 'ProfileCommon' could not be found (in compiler generated code in server)
body: <p>I know it has been asked before, but none worked for me and mine is a little bit different.</p>
  
  <p>My MVC 4 project works locally but in server it fails to run with this error:</p>
  
  <pre><code>Compiler Error Message: CS0246: The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive or an assembly reference?)
  
  Source Error:
  
  
  Line 194:        }
  Line 195:        
  Line 196:        protected ProfileCommon Profile {
  Line 197:            get {
  Line 198:                return ((ProfileCommon)(this.Context.Profile));
  
  Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e3c4a897\ff4f4317\App_Web_pageheader.ascx.cdcab7d2.rpk2croq.0.cs    Line: 196 
  </code></pre>
  
  <p>I have written a custom <code>ProfileProvider</code> and configured the project to use it:</p>
  
  <pre><code>&lt;profile enabled="true" defaultProvider="sql"&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add name="sql" type="BusinessLogic.ProfileProvider" connectionStringName="c" applicationName="/" /&gt;
    &lt;/providers&gt;
  &lt;/profile&gt;
  </code></pre>
  
  <p>I use <code>ProfileBase</code> class to access user profile not <code>ProfileCommon</code>. The error above is in a compiler generated file. why asp.net generates a code that it can't compile? and why it's working locally? </p>
  
  <p>I have .Net Framework 4.5.1 installed locally but in server it's 4.5 . is it related to the problem?</p>