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

夙愿已清 提交于 2019-12-06 15:13:34

问题


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 ;-)



来源:https://stackoverflow.com/questions/7062781/meleze-web-asp-net-mvc-3-razor-minify-and-compress-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!