阻止 ASP.NET 网站项目使用 Web.config 构建某些目录?
在编程时,最长的部分是在我的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
右键单击解决方案资源管理器中的网站项目,然后选择“属性页”。
在“生成”下,更改以下设置:
这将阻止 Visual Studio 在执行生成时生成任何页面。当 WebDev.Webserver 启动时,您的页面将在您访问每个目录时构建。
Right click on the website project in solution explorer, and select property pages.
Under Build, change the following settings:
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.