How to automatically remove HTML comments in Release mode?

asp.net, asp.net-mvc, bundling-and-minification, comments, html

Solution

Use Razor server side comments

@*
This is a server side 
multiline comment 
*@

Problem

I am trying to find a way to automatically remove HTML comments in release mode for two main reasons - Minification: there is a lot of comments in some pages - Comments contain development notices and TODO lists (which are exposed to end user). I am using ASP.NET MVC and looking for something in the same spirit as the bundling and minification features.

Original source