views:

15

answers:

1

I currently have a project I am building in Visual Studio 2005 and I need to be able to build the part of the project some of the time with directory A and sometimes with directory B and never both. If you right click a file (foo.f) --> Click Propeties --> you can change the "Exclude File From Build" from NO to YES and the project will build w/o that individual file.
QUESTION: Is there a way to do this for an entire folder/directory (w/o individually clicking every file in the folder) so that that particular folder/directory will be ignored in the build?

Thanks

NOTE: I know I could select all the files in the directory if there were not subdirectories. I realize that would work but there are many subdirectories within this main directory (1000+ files 20+ subdirectories) and using shift and selecting the top and bottom files...You can not select them all that way...it pops up an error when you right click!

+1  A: 

Solution explorer supports multiple selection.

  • Open the directory
  • Select the top file
  • Hold shift and click on the bottom file.

This will select every file in the directory. The right click context menu will then allow you to exclude them all as a group.

You can get even more fine grained selection by using control to select elements.

JaredPar
I realize that would work but there are many subdirectories within these directories (1000+ files 20+ subdirectories). You can not select them all that way...it pops up an error!
dewalla
@dewalla if there are that many files my advice would be to create 2 separate projects. It will save you a lot of time and hassle
JaredPar
thats really not what I want to do but thanks for trying to help
dewalla