Is it possible to include/exclude certain source files depending on what ta开发者_开发百科rget is selected in Visual Studio? If possible, how?
You can do this by having a define
in the beginning of the relevant source files. Add a unique identifier to each build configuration, and wrap your source file with:
#if _MY_IDENTIFER
...
#endif
If you want a more robust way, switch so by using nant
Yes it is possible. Right click on the file you want to exclude and select Properties. You can now set Action to None according to the target.
精彩评论