asp.net-mvcrazorminify

MVC ASP.NET minify Views .cshtml


I have two simple questions:

  1. Is there a way to minify a .cshtml file like a JavaScript file or a CSS file?
  2. Are there any performance improvements if we minify all the views in a project?

Solution

  • This tool is a Razor compiler that minified HTML at precomile-time:

    https://github.com/jitbit/HtmlOptimizerMvc4