【问题标题】:aspnet_compiler and msbuild.exeaspnet_compiler 和 msbuild.exe
【发布时间】:2009-09-02 18:04:50
【问题描述】:

我对 msbuild 和 aspnet_compiler 还是很陌生。

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

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

【问题讨论】:

    标签: msbuild aspnet-compiler


    【解决方案1】:

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

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

    【讨论】:

      【解决方案2】:

      您是正确的,您可以手动调用 aspnet_compiler.exe 工具。但更好的是使用Web Deployment Projects 来帮助您做到这一点。

      【讨论】:

      • msbuild.exe和aspnet_compiler有什么区别?
      猜你喜欢
      • 2016-05-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多