title: File not found when building a Web Deployment Project
body: <p>I've got a web deployment project that builds and zips a web application project. I am getting a lot of errors when I build the WDP, as follows:</p>
  
  <blockquote>
    <p>Error 73  The file '/Foo.csproj/Properties/Administration/Modules/ACL.ascx' does not exist.   /Foo.csproj/Properties/Administration/ACL.aspx</p>
    
    <p>Error 74  Unknown server tag 'foo:ACL'.   /Foo.csproj/Properties/Administration/ACL.aspx  </p>
  </blockquote>
  
  <p>These errors are coming from the Web Deployment Project, not the WAP.
  The errors always follow the same pattern, first there is an error finding the .ascx and then an associated error saying the server tag related to the previous ascx is unknown (this obviously makes sense).</p>
  
  <p>There are no errors or warnings in the ascx or aspx.</p>
  
  <p>The controls are registered using a <code>&lt;%@ Register %&gt;</code> tag (as opposed to being registered in the web.config)</p>
  
  <p><strong>What could be causing such a symptom?</strong></p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The errors are coming from <code>aspnet_compiler.exe</code> which is run with the following command:</p>
  
  <blockquote>
    <p>C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v "/Foo.csproj" -p "C:\Projects\Foo\Foo" -u -f -d obj\Staging\TempBuildDir  </p>
  </blockquote>
  
  <p>and produces the following errors</p>
  
  <blockquote>
    <p>Utility to precompile an ASP.NET application<br>
     Copyright (C) Microsoft Corporation. All rights reserved.
    /Foo.csproj/Properties/Administration/ACL.aspx(5): error ASPPARSE: The file '/Foo.csproj/Properties/Administration/Modules/ACL.ascx' does not exist.<br>
    /Foo.csproj/Properties/Administration/ACL.aspx(7): error ASPPARSE: Unknown server tag 'foo:ACL'.  </p>
  </blockquote>
  
  <p>in Foo.csproj ACL.aspx is declared as</p>
  
  <pre><code>&lt;Content Include="Administration\ACL.aspx" /&gt;
  
  &lt;!-- Snip --&gt;
  
  &lt;Compile Include="Administration\ACL.aspx.cs"&gt;
    &lt;DependentUpon&gt;ACL.aspx&lt;/DependentUpon&gt;
    &lt;SubType&gt;ASPXCodeBehind&lt;/SubType&gt;
  &lt;/Compile&gt;
  &lt;Compile Include="Administration\ACL.aspx.designer.cs"&gt;
    &lt;DependentUpon&gt;ACL.aspx&lt;/DependentUpon&gt;
  &lt;/Compile&gt;
  </code></pre>
  
  <p>and ACL.ascx as</p>
  
  <pre><code>&lt;Content Include="Administration\Modules\ACL.ascx" /&gt;
  
  &lt;!-- Snip --&gt;
  
  &lt;Compile Include="Administration\Modules\ACL.ascx.cs"&gt;
    &lt;DependentUpon&gt;ACL.ascx&lt;/DependentUpon&gt;
    &lt;SubType&gt;ASPXCodeBehind&lt;/SubType&gt;
  &lt;/Compile&gt;
  &lt;Compile Include="Administration\Modules\ACL.ascx.designer.cs"&gt;
    &lt;DependentUpon&gt;ACL.ascx&lt;/DependentUpon&gt;
  &lt;/Compile&gt;
  </code></pre>
  
  <p>I can't understand where the <code>/Properties/</code> element of the paths is coming from in the paths in the error ! It's not in project file and it's not being fed to <code>aspnet_compiler.exe</code>. </p>
  
  <p>The solution file and project files are identical (apart from project names) to a working solution.</p>