In the property pages of a Web Project, there are options to set the MSBuild behaviour for precompilation of the solution. There does not, however, seem to be any way of actually turning this functionality off.
I want to be able to call 'build' on the solution so that MSBuild sorts out all the reference projects, but then doesn't call aspnet_compiler as we need to do this manually in our build script (we can't replicate the command line we require from the subset of options available in the property page).
As Web Projects have no project file, I can't add a condition to this stage manually, so currently we end up calling aspnet_compiler twice, it works but isn't really ideal.
Any suggestions

Not precompiling Web Project from MSBuild
JedrekMedrek
James,
I've sent mail to the web deployment project team to ask them to jump in on this thread. They are experts in how it works.
Neil
G1
I did look at the Web Deployment project early on in porting our build environment to MSBuild but I was having all sorts of problems. I'll look into 'stealing' the logic from the _ResolveReferences task though. Thanks for the heads-up.
Andrei Kuzmenkov
The best way to do this is to use the configuration manager to turn building of the Website off for any given configuration.
While the solution is open, from the Build menu, choose "Configuration Manager" uncheck the build check box for the website project you'd like to disable from solution build.
Next time you call build on the solution the website project will not build. The draw back to doing this is that the project will not build and will not resovle references.
Web Deployment Projects have to deal with this same problem and includes a _ResolveReferences task in it's target file for just this reason. You could either use Web Deployment Project or use similar logic from it's .target file in your own.
Hope this helps,
Brad.