Reputation: 7323
Sometimes when working on a large solution, some projects lose all filters (and become a giant list of files instead). When checking the .vcxproj.filters
file, it is indeed invalid XML. I then have to fix the problems manually and reload the project.
However, it is not cut off at the end - it is actually missing lines in the middle, which makes it unlikely to be an unexpected interruption while writing the file.
Here's what it currently looks like:
<ClInclude Include="plugins\FileName1.h">
<Filter>plugins</Filter>
</ClInclude>
<ClInclude Include="utils\FileName2.h">
<Filter>utils</Filter>
<ClInclude Include="otherfolder\FileName3.h">
<Filter>otherfolder</Filter>
</ClInclude>
Note the lack of closing tag for FileName2.h
.
What causes this to happen, and how to avoid it in the future?
Upvotes: 0
Views: 809
Reputation: 31
This problem is caused when using a merge tool that doesn't recognize the closing tag as a line that needs to be added. A merge tool sees the line </ClInclude>
as already present in the target file, and so doesn't merge it.
I'm not sure of a fix beyond more careful merging now that you're aware of the problem.
Upvotes: 1