发布asp.net mvc项目时编译视图 [英] Compiling views when publishing asp.net mvc project

查看:168
本文介绍了发布asp.net mvc项目时编译视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在发布Web项目时,是否可以将asp.net mvc视图编译成一个文件?

解决方案

ASP.NET合并工具(Aspnet_merge.exe)和Web部署项目 更新: Aspnet_merge.exe 在安装Visual Studio 2008时附带Windows SDK组件 - 查看%Program Files% \Microsoft SDKs\Windows\v6.0A\bin文件夹。这些链接可能对你很有趣:





更新: / p>

在ASP.NET MVC项目中有< MvcBuildViews> true / false< / MvcBuildViews> 属性,可以编译AfterBuild目标中的视图。但是它不会在一个程序集中编译你的项目。您应该使用ASP.NET合并工具或Web部署项目。


Is is possible to compile asp.net mvc views into one assemply when publishing web project?

解决方案

There is ASP.NET Merge tool (Aspnet_merge.exe) and Web Deployment Projects ( UPDATED: Aspnet_merge.exe came with Windows SDK components when you installing Visual Studio 2008 - look at "%Program Files%\Microsoft SDKs\Windows\v6.0A\bin" folder ). These links may be interesting to you:

UPDATED:

In ASP.NET MVC projects there is <MvcBuildViews>true/false</MvcBuildViews> property which enables compiling Views in AfterBuild target. But it does not compile your project in one assembly. You should use ASP.NET Merge tool or Web Deployment Projects.

这篇关于发布asp.net mvc项目时编译视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆