title: How to configure HTML Minification in ASP.NET MVC
body: <p>I would like to configure HTML minification to my ASP>NET MVC5 web application.</p>
  
  <p>I installed Nuget</p>
  
  <pre><code>Install-Package WebMarkupMin.Mvc
  </code></pre>
  
  <p>Then I add Filter Attributte:</p>
  
  <pre><code>[MinifyHtmlAttribute]
  public ActionResult Index()
  {           
      return View();
  }  
  </code></pre>
  
  <p>But the HTML minification does not work.</p>
  
  <p>Nuget Installation add few lines to the web.config:</p>
  
  <pre><code>&lt;sectionGroup name="webMarkupMin"&gt;
        &lt;section name="core" type="WebMarkupMin.Core.Configuration.CoreConfiguration, WebMarkupMin.Core" /&gt;
        &lt;section name="webExtensions" type="WebMarkupMin.Web.Configuration.WebExtensionsConfiguration, WebMarkupMin.Web" /&gt;
  &lt;/sectionGroup&gt;
  
  &lt;webMarkupMin xmlns="http://tempuri.org/WebMarkupMin.Configuration.xsd"&gt;
    &lt;core&gt;
      &lt;css&gt;
        &lt;minifiers&gt;
          &lt;add name="NullCssMinifier" displayName="Null CSS Minifier" type="WebMarkupMin.Core.Minifiers.NullCssMinifier, WebMarkupMin.Core" /&gt;
          &lt;add name="KristensenCssMinifier" displayName="Mads Kristensen's CSS minifier" type="WebMarkupMin.Core.Minifiers.KristensenCssMinifier, WebMarkupMin.Core" /&gt;
        &lt;/minifiers&gt;
      &lt;/css&gt;
      &lt;js&gt;
        &lt;minifiers&gt;
          &lt;add name="NullJsMinifier" displayName="Null JS Minifier" type="WebMarkupMin.Core.Minifiers.NullJsMinifier, WebMarkupMin.Core" /&gt;
          &lt;add name="CrockfordJsMinifier" displayName="Douglas Crockford's JS Minifier" type="WebMarkupMin.Core.Minifiers.CrockfordJsMinifier, WebMarkupMin.Core" /&gt;
        &lt;/minifiers&gt;
      &lt;/js&gt;
      &lt;html whitespaceMinificationMode="Medium" removeHtmlComments="true"
            removeHtmlCommentsFromScriptsAndStyles="true"
            removeCdataSectionsFromScriptsAndStyles="true"
            useShortDoctype="true" useMetaCharsetTag="true"
            emptyTagRenderMode="NoSlash" removeOptionalEndTags="true"
            removeTagsWithoutContent="false" collapseBooleanAttributes="true"
            removeEmptyAttributes="true" attributeQuotesRemovalMode="Html5"
            removeRedundantAttributes="true"
            removeJsTypeAttributes="true" removeCssTypeAttributes="true"
            removeHttpProtocolFromAttributes="false"
            removeHttpsProtocolFromAttributes="false"
            removeJsProtocolFromAttributes="true"
            minifyEmbeddedCssCode="true" minifyInlineCssCode="true"
            minifyEmbeddedJsCode="true" minifyInlineJsCode="true"
            processableScriptTypeList="" minifyKnockoutBindingExpressions="false"
            minifyAngularBindingExpressions="false" customAngularDirectiveList="" /&gt;
      &lt;logging&gt;
        &lt;loggers&gt;
          &lt;add name="NullLogger" displayName="Null Logger" type="WebMarkupMin.Core.Loggers.NullLogger, WebMarkupMin.Core" /&gt;
          &lt;add name="ThrowExceptionLogger" displayName="Throw exception logger" type="WebMarkupMin.Core.Loggers.ThrowExceptionLogger, WebMarkupMin.Core" /&gt;
        &lt;/loggers&gt;
      &lt;/logging&gt;
    &lt;/core&gt;
  &lt;/webMarkupMin&gt;
  </code></pre>
  
  <p>The html element was added by me manually according to <a href="http://webmarkupmin.codeplex.com/wikipage?title=WebMarkupMin%200.9.2" rel="nofollow">documentation</a>.</p>
  
  <p>Am I missing something?</p>