We're looking to create a library to link several projects against in Visual Studio. The source for this library is maintained outside of Visual Studio. Is there a way to automatically scrape a specified directory (or directories) for *.cpp files and automatically add them to the library? Currently we have to add or delete files as required (right click project, add, existing).
This answer from (@Yuchen Zhong)
In visual studio 2015, this is how you do it.
If you wanted to automatically include all descendant files below a specific folder:
<Content Include="Path\To\Folder\**" />
from this SO question: How do I add an existing directory tree to a project in Visual Studio? should give you all you need.
<Content Include="Path\To\Folder\*.cpp" >
I knew the answer, and that it must be posted somewhere...took me a little bit to find, so hoping this answer helps others find the other answer.