title: ASP.NET compiler can't find any namespace
body: <p>I have a <code>foo.cs</code> file</p>
  
  <pre><code>namespace LoL
  {
      public class testing2
      {
  
      }
  }
  </code></pre>
  
  <p>and in</p>
  
  <p><code>Default.aspx.cs</code> file:</p>
  
  <p><strong>UPDATE:</strong> I don't know if it can help really, but here's all <code>Default.aspx.cs</code> file:</p>
  
  <pre><code>using System;
  using System.Collections;
  using System.Configuration;
  using System.Data;
  using System.Linq;
  using System.Web;
  using System.Web.Security;
  using System.Web.UI;
  using System.Web.UI.HtmlControls;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;
  using System.Xml.Linq;
  using LoL;
  
  namespace WebApplication4
  {
      public partial class _Default : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
  
          }
      }
  }
  </code></pre>
  
  <p>and I get:</p>
  
  <blockquote>
    <p>Compiler Error Message: CS0246: The type or namespace name 'LoL'
    could not be found (are you missing a using directive or an assembly
    reference?)</p>
  </blockquote>
  
  <p>For any class that I try to use. Not libraries only. I tried several solutions moving/copying files, on VS: Porject > add existing file > foo.cs etc </p>
  
  <p>but no luck in any of them.</p>
  
  <p>How to fix this? I have no idea how to fix this.</p>
  
  <p>NOTE: If I try by using F5 mode in VS, it work, but put the website on <code>C:\inetpub\wwwroot\</code> give this error as in the host.</p>
  
  <p><strong>EDIT:</strong> By error message on ASP.NET page I can see that IIS is calling C# compiler 4.0, but I'm targeting .NET framework 3.5 on my VS 08 (the last version avaliable on VS 08). Can this have some relation to my problem?</p>
  
  <p><strong>EDIT2:</strong> I'm able to compile my web site project from command line sucessfully. With <code>msbuild</code> program on project path. It just doesn't work when IIS try to compile it. The IIS don't know about <code>foo.cs</code> file.</p>
  
  <p><strong>EDIT3:</strong> Now I'm using <code>aspnet_compiler</code>(in cmd.exe) program:</p>
  
  <blockquote>
    <p>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler -v webApplication4</p>
  </blockquote>
  
  <p>On path: <code>C:\inetpub\wwwroot\webApplication4</code></p>
  
  <p>I'm getting same error. So, I looked at Visual Studio configuration stuff, it's the <code>.csproj</code> file, I was looking for the inclued files passed by compiler (generated by VS).</p>
  
  <p>I found them on <code>ItemGroup</code> tag:</p>
  
  <pre><code>  &lt;ItemGroup&gt;
      &lt;Compile Include="foo.cs" /&gt;
      &lt;Compile Include="Default.aspx.cs"&gt;
  </code></pre>
  
  <p>As your can seen, the <code>foo.cs</code> is included to be compiled. So, the file is there. Why aspnet compiler can't  find any namespace?</p>