Why can't you build a website in release mode?

In web site projects each page is compiled dynamically upon first request. It will compile without debugging symbols unless you specify otherwise in the config file.


A Web Site's debug/release is controlled by the Web.Config file:

<system.web>
  ...
  <compilation debug="true">
  ...
  </compilation>
</system.web>

Set debug="true" for debugging, set debug="false" for release.


Probably because a Web Application compiles the whole website into one DLL. To run and debug pages requires recompiling the entire application. Whereas a website project compiles dynamically at the page level.