Why do vcxproj.filters files exist?

Visual StudioVisual Studio-2010

Visual Studio Problem Overview


Shouldn't vcxproj.filters be embedded in the .vcxproj? As it stands I have to check this in to source control so others can see the folder structuring in the solution.

Visual Studio Solutions


Solution 1 - Visual Studio

According to what Dan Moseley says in https://stackoverflow.com/questions/1826901/should-i-add-the-vcxproj-filter-files-to-source-control">this question, they also wanted to separate the tree structure from the build specific information because changing the tree structure would cause an update to be made to the project file, and that in turn would trigger a rebuild. By moving the logical view of the project to a separate file this is avoided.

Solution 2 - Visual Studio

They were embedded in fact, in previous versions of Visual Studio. The extension was still .vcproj and the filters were stored inside the project file. However, as of 2010 it was decided to pull the .filter information into a separate file.

It is really up to the design teams now to decide whether to add this source control or not. If you want all the developers to have the same structure (for reasons of communication) it might be wise to check them in. If you want to allow each developer to use their own logical view, then don't.

Solution 3 - Visual Studio

The vcxproj file contains the commands for the msbuild environment. So it contains the files that should be built and the arguments for the compiler how to build/link etc. the source files.

Due to this, the development team decided that the 'view' of the files in the solution explorer should not be contained in the msbuild file, but in another file.

So this was done to separate the build settings from the view you have.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDavidView Question on Stackoverflow
Solution 1 - Visual StudioMiguel GrinbergView Answer on Stackoverflow
Solution 2 - Visual StudioEdwin de KoningView Answer on Stackoverflow
Solution 3 - Visual StudioChristopherView Answer on Stackoverflow