Project-system: VS 2015 RTM - csproj xml node Project\ProjectExtensions\VisualStudio\UserProperties attribute order differs based on machine that saves file

Created on 13 May 2016  路  3Comments  路  Source: dotnet/project-system

_From @bbarry on November 4, 2015 18:21_

When 2 or more people make changes to a project that has multiple properties stored on the UserProperties tag, the order of the properties on the attribute appears to depend on order that code runs to set the attributes.

I have several csproj files with

<ProjectExtensions>
  <VisualStudio>
    <UserProperties 
      PingPoet_SlashDocs_DocCommentIncludeFileBasePath="...removed..." 
      PingPoet_SlashDocs_SlashDocPathReplacePattern="...removed..." 
      PingPoet_SlashDocs_SlashDocPathMatchPattern="^...removed...$" />
  </VisualStudio>
</ProjectExtensions>

(the node is on one line).

With the project file in source control and multiple developers, this line changes every time a dev makes any change to the file. This results in merge conflicts very often as in this case there are 6 possible ways to have that line.

_Copied from original issue: dotnet/roslyn#6556_

Bug Feature-Project-File-Simplification Resolution-Fixed Triage-Approved

Most helpful comment

We have fixed this in the new project system and now persist in machine agnostic order, existing projects will benefit from this when the new project system starts opening .NET Framework-based projects in the future.

Microsofties, PR is here: https://devdiv.visualstudio.com/DevDiv/_git/CPS/pullrequest/225250.

All 3 comments

We're also seeing this in Visual Studio 2017.

We have fixed this in the new project system and now persist in machine agnostic order, existing projects will benefit from this when the new project system starts opening .NET Framework-based projects in the future.

Microsofties, PR is here: https://devdiv.visualstudio.com/DevDiv/_git/CPS/pullrequest/225250.

This fix has been merged. Make explicit note that existing .NET Framework projects _will not_ benefit until they are opened in the new project system, something that is planned but we have no date.

Was this page helpful?
0 / 5 - 0 ratings