aspnet_compiler 和 msbuild.exe

发布于 2024-08-03 20:47:39 字数 239 浏览 3 评论 0原文

我对 msbuild 和 aspnet_compiler 还很陌生。

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

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

I am pretty new to msbuild and aspnet_compiler.

I am using aspnet_compiler to compile web application project. Now I just saw the MSBuild.exe and noticed that its builds my website into the /mywebsite/precompiledWeb folder. Now why do I need to use MSBuild.exe? Can't I directly use the aspnet_compiler to see if my website can be built properly?

(Not sure if I explained it very well).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陪我终i 2024-08-10 20:47:39

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

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

msbuild.exe is usually used to build projects and its dependencies. When you have a web application project with a project file, vs can use this to build not only your web project but all the dependencies involved. This would only build your source code files, not the markup files (.aspx,.ascx,.etc).

aspnet_compiler is meant to build a web site project that doesn't have a project file. This said, you can also use it to make sure your markup files are also built for your web application project.

哽咽笑 2024-08-10 20:47:39

您是对的,您可以手动调用 aspnet_compiler.exe 工具。但更好的是使用 Web 部署项目可以帮助您做到这一点。

You are correct you can manually invoke the aspnet_compiler.exe tool. But better would be to use Web Deployment Projects to help you do this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文