Hacker News new | ask | show | jobs
by TillE 3397 days ago
Does that feature exist in other Visual Studio project types? There's always CMake to help in situations like that.
1 comments

It does and can most likely be enabled by editing the vcxproj directly. Edit: something along the lines of:

    <ItemGroup>
        <Content Include="**\*.h" />
        <Content Include="**\*.cpp" />
    </ItemGroup>
Edit: see response.
This is correct, take a look at https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuil... and child topics on inclusion/exclusion.

-eric PM, VC++ team

While it does work in the builds, the IDE is not supporting this particularly well. As another comment pointed out, changes on the filesystem are not automatically detected. Also, some IDE functionality doesn't work propetly in a project with <ClCompile Include="*.cpp"/> - for example, Add New/Existing Item fails with an error.
That should probably be

    <ClCompile Include="**\*.cpp" />
at least if you want to get the sources compiled