问题描述
在进行编程时,最长的部分是在我的ASP.NET网站项目上进行的构建,如下所示是构建目录过程。 (注意:我没有自由将其转换为带有.csproj构建文件的Web应用程序。希望我这样做。)
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.)
尽管在App_Code /子文件夹中可能存在某些依赖关系,但下面显示的目录的内容没有改变。
The contents of the directories seen below are not changing although there might be some dependencies in the App_Code/ subfolders that do change.
我有什么办法吗?阻止使用Web.config 建立某些目录,以缩短我的dev副本的编译时间?这是我想到的唯一没有正式构建文件的可行文件。
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/'.
推荐答案
在解决方案资源管理器中右键单击网站项目,然后选择属性页。
Right click on the website project in solution explorer, and select property pages.
在构建中,更改以下设置:
Under Build, change the following settings:
- 开始操作/在运行启动页面之前-无构建
- 构建解决方案操作-取消选中将网站构建为解决方案的一部分
执行构建时,这将阻止Visual Studio构建任何页面。当WebDev.Webserver启动时,现在将在访问每个目录时构建页面。
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.
这篇关于阻止ASP.NET网站项目通过使用Web.config构建某些目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!