For VS2010 and before I was utilizing Web Deployment Projects (WDP) to help package my website for production deployment. I had a MSBuild script that compiled the solution in r
I wasn't able to get the publish to run, but looking at the output from Visual Studio I think I have found an alternate solution. Turns out the obj\Release\AspnetCompileMerge folder has a deployable and clean version of the project. It contains byte identical files to the final output folder.
I did have to change my msbuild script to include the DeployOnBuild option...