阻止 ASP.NET 网站项目使用 Web.config 构建某些目录?

发布于 2024-08-23 23:35:43 字数 752 浏览 4 评论 0原文

在编程时,最长的部分是在我的 ASP.NET 网站项目上构建,即下面所示的“构建目录”过程。 (注意:我没有自由将其转换为带有 .csproj 构建文件的 Web 应用程序。希望我做到了。)

下面看到的目录内容没有改变,尽管可能有App_Code/ 子文件夹中的一些依赖项确实发生了变化。

有什么方法可以阻止使用 Web.config 构建某些目录,以缩短我的开发副本的编译时间?这是我能想到的唯一可以在没有官方构建文件的情况下使用的可行文件。

------ Build started: Project: C:\...\cmsappmin-abcd\, Configuration: Debug Any CPU ------
Validating Web Site
Building directory '/cmsappmin-abcd/abcd/controls/docsearch/'.
Building directory '/cmsappmin-abcd/abcd/controls/'.
Building directory '/cmsappmin-abcd/abcd/controls/pipco/'.
Building directory '/cmsappmin-abcd/abcd/controls/reg1000/'.
Building directory '/cmsappmin-abcd/abcd/TemplateC/'.
Building directory '/cmsappmin-abcd/abcd/Template/'.

While programming, the longest part is a build on my ASP.NET Website project is the "Building directory" process seen below. (Note: I don't have the liberty to turn this into a Web Application with a .csproj build file. Wish I did.)

The contents of the directories seen below are not changing although there might be some dependencies in the App_Code/ subfolders that do change.

Is there any way for me to stop some directories from building using Web.config, to shorten a compile of my dev copy? It's the only viable file I can think of to use without having an official build file.

------ Build started: Project: C:\...\cmsappmin-abcd\, Configuration: Debug Any CPU ------
Validating Web Site
Building directory '/cmsappmin-abcd/abcd/controls/docsearch/'.
Building directory '/cmsappmin-abcd/abcd/controls/'.
Building directory '/cmsappmin-abcd/abcd/controls/pipco/'.
Building directory '/cmsappmin-abcd/abcd/controls/reg1000/'.
Building directory '/cmsappmin-abcd/abcd/TemplateC/'.
Building directory '/cmsappmin-abcd/abcd/Template/'.

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

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

发布评论

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

评论(1

甜味超标? 2024-08-30 23:35:43

右键单击解决方案资源管理器中的网站项目,然后选择“属性页”。

在“生成”下,更改以下设置:

  • 开始操作/运行启动页面之前 - 无生成
  • 生成解决方案操作 - 取消选中“将网站生成为解决方案的一部分”

这将阻止 Visual Studio 在执行生成时生成任何页面。当 WebDev.Webserver 启动时,您的页面将在您访问每个目录时构建。

Right click on the website project in solution explorer, and select property pages.

Under Build, change the following settings:

  • Start action/Before running startup page - No Build
  • Build solution action - uncheck "Build Web site as part of solution"

That will stop Visual Studio from building any pages when performing a build. When WebDev.Webserver starts, your pages will now be built as and when you access each directory.

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