Scott Hanselman announced ASP.NET and Web Tools 2012.2 (Release Candidate) today and it’s great for the first time it’s easy to deploy a DD Web Application Project (WAP) site precompiled and un-editable it’s just a check box now.
Figure 1 - New Publish Wizard
Navigate to the Settings Tab and check the “Precompile during publishing” checkbox and then click “Configure”
Figure 2 - Disabled Editable markup.
un-check the “Allow precompiled site to be updatable” checkbox and your pages will no look like this Figure 3 if someone tries to edit them
Figure 3 - Precompiled aspx page no un-editable
And finally in VS2012 you can set the build configuration in each Publish profile, this works without having to change the build configuration in you project.