Page 1 of 1

Misleading compare results for .vcxproj.filters (XML)

PostPosted: Thu Feb 06, 2020 3:04 pm
by tbrammer
Visual Studio inserted the XML block below into an existing .vcxproj.filters:
Code: Select all
    <ClInclude Include="inc\ElevationViewDim.h">
      <Filter>Header Files</Filter>             
    </ClInclude>     


When I compare old vs. new I would expect the compare result to look like this:

Code: Select all
  <ItemGroup>                                        <ItemGroup>                                         
    <ClInclude Include="inc\AnimationCommands.h">      <ClInclude Include="inc\AnimationCommands.h">     
      <Filter>Header Files</Filter>                      <Filter>Header Files</Filter>                     
    </ClInclude>                                       </ClInclude>                                     
    <ClInclude Include="inc\FxfRefs.h">                <ClInclude Include="inc\FxfRefs.h">                 
      <Filter>Header Files</Filter>                      <Filter>Header Files</Filter>                     
    </ClInclude>                                       </ClInclude>                                 
    <ClInclude Include="inc\ElevationViewDim.h">     ::::::::::::::::::::::::::::::::::::::
      <Filter>Header Files</Filter>                  :::::::::::::::::::::::::::::::::::::: 
    </ClInclude>                                     ::::::::::::::::::::::::::::::::::::::
  </ItemGroup>                                       </ItemGroup>


But sometimes it looks like this instead:
Code: Select all
  <ItemGroup>                                        <ItemGroup>                                         
    <ClInclude Include="inc\AnimationCommands.h">      <ClInclude Include="inc\AnimationCommands.h">     
      <Filter>Header Files</Filter>                      <Filter>Header Files</Filter>                     
    </ClInclude>                                       </ClInclude>                                     
    <ClInclude Include="inc\FxfRefs.h">                <ClInclude Include="inc\FxfRefs.h">                 
      <Filter>Header Files</Filter>                  ::::::::::::::::::::::::::::::::::::::               
    </ClInclude>                                     ::::::::::::::::::::::::::::::::::::::         
    <ClInclude Include="inc\ElevationViewDim.h">     ::::::::::::::::::::::::::::::::::::::
      <Filter>Header Files</Filter>                      <Filter>Header Files</Filter>       
    </ClInclude>                                       </ClInclude>                       
  </ItemGroup>                                       </ItemGroup>


So it looks as if I had inserted this block:

Code: Select all
    <Filter>Header Files</Filter>             
  </ClInclude>                               
  <ClInclude Include="inc\ElevationViewDim.h">


This isn't wrong - but misleading.
Is it possible to make sure that Windiff uses the first differing line as beginning of the difference-range?
Or maybe even some "additional intelligence" to detect inserted XML-blocks?