title: How do I resolve "Type or namespace could not be found" compilation error?
body: <p>I'm concerned that the web hosting that I'm paying for is not configured correctly.  ASP.NET Web Sites which compile and run correctly on my local machine don't work once they're deployed.</p>
  
  <p>The issue I'm dealing with is a compilation error: CS0246, "Type or namespace could not be found (Are you missing a 'using' directive or assembly reference?)</p>
  
  <p>My Web Site contains the following files and folders:</p>
  
  <pre><code>websitedemo/Default.aspx
  websitedemo/Default.aspx.cs
  websitedemo/App_Code/HelloClass.cs
  </code></pre>
  
  <p>The compilation error occurs if I attempt to use any code contained in my App Code folder.
  I've included the entire /websitedemo/ folder in this archive if it helps troubleshoot the error: <a href="http://kivin.ca/websitedemo/source.zip" rel="nofollow noreferrer">http://kivin.ca/websitedemo/source.zip</a></p>
  
  <p>I've left the folder in debug mode.  The compilation error screen may be viewed at <a href="http://kivin.ca/websitedemo/" rel="nofollow noreferrer">http://kivin.ca/websitedemo/</a></p>
  
  <p>Best regards.</p>
  
  <p>-- update:</p>
  
  <p>If it helps troubleshoot this error, I've got the behaviour that occurs when I attempt to deploy an ASP.NET WebApplication instead of Website.</p>
  
  <p>In the case that my aspx file includes a @Page direct like this:</p>
  
  <p><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="myproj._Default" Debug="true" %&gt;</code></p>
  
  <p>The compilation error I get is: 'Parser Error Message: Could not load type 'myproj._Default'.'</p>
  
  <p>The webapps are being deployed via ftp using Build -> Publish -> [X] Replace matching files, [X] Only files needed to run this app. [X] Include App_Data folder.</p>