A related problem is that the Web Deployment Project will still attempt to build any ASPX/ASCX files that have been excluded from a Web Application Project. This will fail, presumably because the codebehind files have not been built by the Web Application Project.
It seem the Web Deployment Projects add-in doesn't work well with Web Application Projects. I think it needs to be modified to:
- Copy project files (including AS*X files, content files and the bin directory, but excluding files with Build=None) to a temporary directory.
- Perform the precompilation in the temporary directory
- Copy the result to the output directory.