title: .NET WAP Publish Question - CodeFile included in publish
body: <p>I am using a Web Application Project to develop some web user controls (c#).</p>
  
  <p>In the WAP the user control directive contains the codefile and inherits attributes.</p>
  
  <p>When I publish the WAP to the target website. The dll from bin is copied correctly to the bin of the website, the user controls (.ascx files) are copied correctly.</p>
  
  <p>When I perform a build on the website, I get errors as the ascx files still contain the codefile attribute in the directive.  To resolve this I simply remove the codefile attribute and the ascx still works as the code is picked up through the inherits (which is now in the dll).</p>
  
  <p>My question is - can the publish automatically remove the codefile attribute for me. or.. am I using WAP / Build / Publish incorrectly?</p>
  
  <p>Many Thanks,
  Adam</p>