aspnet_compiler 和 msbuild.exe

vik*_*sde 4 msbuild aspnet-compiler

我对 msbuild 和 aspnet_compiler 还很陌生。

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

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

egl*_*ius 5

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

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