title: Assemble reference error while compiling C# project using NANT even after giving the reference
body: <p>My solution has multiple projects with Internal reference to each other. Project name DataAccess references Objects project. In my NANT script I first compile the Objects folder which succeeds and then when I try to compile DataAccess project I get the assembly reference error which is as below;</p>
  
  <p>error CS0246: The type or namespace name 'CustomerProfile' could not be found (are you missing a using directive or an assembly reference?)</p>
  
  <p>CustomerProfile Class is part of the Objects project and I am clearly mentioning the reference in the NANT as shown below;</p>
  
  <pre><code>&lt;csc target="library" output="${OutputFolder}\bin\Objects.dll" debug="${debug}"&gt;
      &lt;references /&gt;
      &lt;sources basedir="${SourceCodeFolder}"&gt;
          &lt;include name="Objects\\**\*.cs" /&gt;
      &lt;/sources&gt;
  &lt;/csc&gt;
  &lt;csc target="library" output="${OutputFolder}\bin\DataAccess.dll" debug="${debug}" &gt;
      &lt;references&gt;
          &lt;lib&gt;
              &lt;include name="${OutputFolder}\bin" /&gt;
          &lt;/lib&gt;
          &lt;include name="Objects.dll" /&gt;
      &lt;/references&gt;
      &lt;sources basedir="${SourceCodeFolder}"&gt;
          &lt;include name="DataAccess\\**\*.cs" /&gt;
      &lt;/sources&gt;
  &lt;/csc&gt;  
  </code></pre>
  
  <p>Weird thing is if I remove the <code>&lt;include name="Objects.dll" /&gt;</code> from the reference section I get the below error; </p>
  
  <p>error CS0234: The type or namespace name 'Objects' does not exist in the namespace '' (are you missing an assembly reference?)</p>
  
  <p>Which confirms that the assembly references should b given the way I have given in the above code snippet. But I fail to understand that if the assembly refernce is done correctly then how come the class ('CustomerProfile') withing that assembly is not getting picked up</p>
  
  <p>Can any one please help?</p>