How to exclude files from Visual Studio compile?

I'm in the process of refactoring a project. I've got an entire subfolder which is known to be broken. Is there any declarative way to exclude that folder from the compile temporarily while I test the refactoring thus far?

I realize I could delete the folder, but I'd like to do this through configuration if possible.


Solution 1:

You could set the Build Action (in the Properties Window) to None for the files you want excluded. You could also right-click on the folder and choose Exclude from Project.

Solution 2:

In VS 2010, right-click on the CPP module, choose Properties.

Then click on Configuration Properties -> General, Exclude from Build = Yes.

"Exclude from Project" is no good, it disappears from the other Configurations as well.