locked
VS IDE Issue Causing Code Conflicts in Project Files RRS feed

  • Question

  • All,

    This may not be the place to raise this issue, but it has to be expressed.  

    I've experience countless code conflicts with other team members when adding and removing content from a project file (albeit CSProj, VBProj, ect.).  The issue seems to be caused by the VS IDE which does not sort the project file elements.  For example, if my project has a file called "Class1.cs" and I check this project in, when another team member adds a new files to the project, there is often a conflict.  Since VS does not have any standard for arranging these items in the project file, they can end up on random lines.  This issue is exacerbated if someone accidentally deleted or exclude the "Class1.cs" file.  When they add the file back to the project, VS often puts the reference on a totally different line (and even a different group), in the project file. 

    It would make sense if VS would sort the items in the files by name.  It would also help if VS had some discernable method of grouping items in the file as well.  This way the removal and addition of a file will always end up on a consistent line.  In addition, adding of new files (based on their name), would end up on a discernable location in the project file; which will reduce conflicts.

    I've observed this issue with TFS, VSTS and Git code repositories and can say with absolute certainty that the problem is cause by the VS IDE only.  


    - Rashad Rivera [omegusprime.com]

    Friday, April 12, 2019 2:57 PM

All replies

  • Hi Rashad Rivera,

    Sorry for delay in reply.

    What is your version of your visual studio?

    We use visual studio 2017 15.9.10 to re-add file into project and the file can be sorted by their name. Then save the project and open .csproj file, the elements have been also sorted in their original position.

    Please have a try with visual studio 2017. If this issue persists, please share screen shots with us for further troubleshooting.

    Best Regards,

    Dylan

     


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, April 15, 2019 9:53 AM