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.


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 .


Right click all the files, and select Properties. Now set Action to None. Revert to Compile when you fixed the code :)


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.

链接地址: http://www.djcxy.com/p/85434.html

上一篇: 面向MATLAB的代码?

下一篇: 如何从Visual Studio中排除文件编译?