Meleze.web asp.net mvc 3 razor minify and compress

2019-04-18 01:06发布

问题:

I have find meleze.web in nuget to remove extra white spaces in generated html result. but when i set web.config new , and run nothing happend to result. is there any correct sample or special configs ?

<configuration>
  <system.web.webPages.razor>
    <host factoryType="Meleze.Web.Razor.MinifyHtmlWebRazorHostFactory,Meleze.Web.Razor" />
 </system.web.webPages.razor>
</configuration>

回答1:

For a little bit of context, we're talking about the tool described here: http://cestdumeleze.net/blog/2011/minifying-the-html-with-asp-net-mvc-and-razor/

I used the following config:

<configuration>
    ...
    <system.web.webPages.razor>
        <host factoryType="Meleze.Web.Razor.MinifyHtmlWebRazorHostFactory, Meleze.Web, Version=1.0.0.1, Culture=neutral, PublicKeyToken=0a868b5321967eda" />
        ...


回答2:

Maybe you have changed the /web.config instead of the /Views/web.config that config.

Contact the package owner if needed to get help ;-)