Among other things, I would imagine a Visual C++ solution is meant to encompass all source code files for a given product. However, thanks to the “Additional Include Directories” and the built-in C++ ability to include absolute and relative paths — it is possible to include files that are not part of the solution (starting w/ the standard C++ headers).
This can happen both by mistake and on purpose. However, in order to keep dependencies under control and a good overview of which files are the product’s source code and which files are built-in Visual Studio files, it would be great if there were a way to tell which includes are not part of the current solution.
See this example:
- C:/Dev/Projects/Project-A/Project-A.vcproj
- C:/Dev/Projects/Project-A/Project-B.vcproj
- C:/Dev/Projects/Project-A/Project-C.vcproj
- C:/Dev/Projects/Project-A/Project-D.vcproj
If I create a solution, which only contains Project-A, and Project-B, there is nothing preventing Project-A to include files from under Project-C and Project-D. This means that if for example I wish to distribute this solution, I might overlook Project-C and Project-D.
Can we get VC++ to give a warning about source code files that are not explicitly part of the solution — outside of course, the standard C++ headers? Or at least provide a full list of files that are eventually included in the final library/executable?
Thanks in advance!
The include files that are not a part of the project usually automatically placed in the “External Dependencies” folder of the project in Solution Explorer.