There are existing “There are no property pages for the selection” questions already on StackOverflow, but I ran into a new version.
In my case, after a Git merge only one project out of 14 had a “There are no property pages for the selection” error. The associated .vcproj file showed no obvious errors.
On the side of the .vcproj is an additional file, .vcproj.filters. This controls the layout of the Solution Explorer. It's structure is similar to this:
The problem here is if two Git commits each add one of these files. Git Merge doesn't understand XML, and will merge the (identical) close tags. This leaves you with two
<ClCompile>
tags and only one</ClCompile>
.The fix is to unload the project,
Open With>XML editor
the .filters file, and find the missing</ClCompile>
.P.S. Feature request to Microsoft
Be verbose, use
<ClCompile Include="B.cpp" Filter="Source Files" />
. Attributes should not be children, and the limited domain ofFilter
makes it clear that this is an attribute. As a one-liner, this is merge-safe.