Buyuk
Buyuk

Reputation: 1094

How to make visual studio automatically add files to the project?

Is there a way to make visual c++ automatically include all source files in a project's dir to a project? I want to see them in solution explorer, and include them in compilation. Not being able to do so becomes a problem when you are working with git.

Upvotes: 1

Views: 2467

Answers (1)

mwarsco
mwarsco

Reputation: 541

I know this is an old question, but I stumbled upon it in a google search, so I'll add my solution for those future googlers.

In the project file you can add the line: <Compile Include="**/*.hpp" />

This will add all c++ header files in any directory under the solution to the project. You can specify the directories instead of the asterisk if you'd like to be more specific.

Upvotes: 2

Related Questions