msbuild - aspnet_compiler 和 msbuild.exe

标签 msbuild aspnet-compiler

我对 msbuild 和 aspnet_compiler 还很陌生。

我正在使用 aspnet_compiler 来编译 Web 应用程序项目。现在我刚刚看到 MSBuild.exe 并注意到它将我的网站构建到/mywebsite/precompiledWeb 文件夹中。为什么我需要使用 MSBuild.exe?不能直接用aspnet_compiler看看能不能正常建站吗?

(不确定我是否解释得很好)。

最佳答案

msbuild.exe 通常用于构建项目及其依赖项。当你有一个带有项目文件的 web 应用程序项目时,vs 不仅可以使用它来构建你的 web 项目,还可以构建所有涉及的依赖项。这只会构建您的源代码文件,而不是标记文件(.aspx、.ascx 等)。

aspnet_compiler 用于构建没有项目文件的网站项目。也就是说,您还可以使用它来确保您的标记文件也是为您的 Web 应用程序项目构建的。

关于msbuild - aspnet_compiler 和 msbuild.exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1369250/

相关文章:

iis-7 - 为 IIS 7 编写远程控制脚本

visual-studio-2010 - MSBUILD 4.0 在 AJAX 扩展上失败

msbuild - 如何在 MSBuild WebProjectOutputDir 中留有空格?

msbuild - 未为项目设置 OutputPath 属性

c# - 如何使用 Ant 和 Mono 编译和构建 C# 项目?

asp.net - 在 ASP.NET 网站项目中使用 64 位引用 - 设计时问题

asp.net - 部署预编译

c# - 为什么 ASP.NET 编译器会在每次构建时重建所有二进制文件?

visual-studio-2008 - 不允许循环文件引用

asp.net - aspnet_compiler 忽略目标目录并将 dll 保留在临时 ASP.NET 文件目录中