Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent ASP.NET Website project from building certain directories by using Web.config?

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/'.
like image 617
John K Avatar asked Mar 02 '10 01:03

John K


1 Answers

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.

like image 113
Lachlan Roche Avatar answered Sep 30 '22 15:09

Lachlan Roche