I suggest you ...

Include whole folder of source files In Visual Studio

Many of our embedded c++ projects are compiled for and debugged on the target platform and win32 (simulation). This requires us to use two different IDEs, in this case Visual Studio and a vendor customized eclipse.
The eclipse based IDE uses a black list approach to source files, meaning that all files will be compiled, unless they are excluded.
We would also like this behavior in VS, because else developers has to manually add them in VS as an extra step, when they are using the other IDE.

We have found one almost working solution:
we edit the .vcxproj files to use wildcards in the "ClInclude" entries:
<ItemGroup>
<ClInclude Include="include\**\*.h" />
<ClInclude Include="include\**\*.hpp" />
<ClInclude Include="src\**\*.hpp" />
<ClInclude Include="src\**\*.h" />
<ClCompile Include="src\**\*.c" />
<ClCompile Include="src\**\*.cpp" />
</ItemGroup>

When the project is loaded, it includes all our source files (success!)
But now adding files from from within VS (Add->New item) results in an error "An internal error occurred. Please contact Microsoft Product Support Services.
" (fail)
Adding files outside VS also requires a complete reload of the solution.
Excluding files is also not easy.

We need Visual studio IDE to fully support the wild card feature.
Best regards
Morten

13 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Morten shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

2 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base