none
How can I compare two code files in VS 2015?

    Question

  • I have just found out that Team Foundation Server offers some useful tools for highlighting the differences between two versions of the same file. However, I  am just a sole developer using Visual Studio Professional 2015 and don't have TFS.

    I would find it useful to have a similar tool for file comparison. Does such a thing exist within VS 2015 Pro?

    David

    • Edited by haggis999 Tuesday, November 10, 2015 1:15 PM
    Tuesday, November 10, 2015 10:25 AM

Answers

  • David,

    You could try looking into visual studio gallery see if find any extension there.

    https://visualstudiogallery.msdn.microsoft.com/

    I am seeing an extension for visual studio named Code Compare you can try this see if it works.

    https://visualstudiogallery.msdn.microsoft.com/dace3633-0b51-4629-85d4-c59cdce5bb3b

    Thanks,

    Sabah Shariq

    Tuesday, November 10, 2015 3:29 PM

All replies

  • Hi,

    There's a tool called Visual Studio Code you can use this to compare code and the best part is this is free. From my experience I consider this is the best tool. Hope this helps you.

    Visual Studio Code

    A Quick Lap Around Visual Studio Code

    How to Compare files in Visual Studio Code ?

    Thanks,

    Sabah Shariq

    Tuesday, November 10, 2015 2:59 PM
  • Hi Sabah,
    Thanks for that suggestion. Am I correct in thinking that Visual Studio Code is a stand-alone app rather than some form of additional tool that you access via the Visual Studio 2015 interface?

    David

    Tuesday, November 10, 2015 3:13 PM
  • Hi David,

    Yes its a stand alone tool. You have to use it separately.

    Thanks,

    Sabah Shariq

    Tuesday, November 10, 2015 3:23 PM
  • David,

    You could try looking into visual studio gallery see if find any extension there.

    https://visualstudiogallery.msdn.microsoft.com/

    I am seeing an extension for visual studio named Code Compare you can try this see if it works.

    https://visualstudiogallery.msdn.microsoft.com/dace3633-0b51-4629-85d4-c59cdce5bb3b

    Thanks,

    Sabah Shariq

    Tuesday, November 10, 2015 3:29 PM
  • Sabah,
    Many thanks for those additional suggestions. I was probably made aware of the Visual Studio Gallery during one of my early installations of VS 20xx but had totally forgotten that it existed. I must check it out properly, as it almost certainly contains some other tools I would find useful.

    Thanks again.

    David

    Tuesday, November 10, 2015 3:50 PM
  • Try WinMerge. It's very useful
    Tuesday, November 10, 2015 4:34 PM
  • Hi Brian,
    Your suggestion of WinMerge is appreciated. Each of the 3 comparison tools mentioned so far will probably behave in different ways, so it's good to have a choice. Time will tell which one is the best fit for my needs.

    David

    Tuesday, November 10, 2015 4:52 PM
  • David,

    You could try looking into visual studio gallery see if find any extension there.

    https://visualstudiogallery.msdn.microsoft.com/

    I am seeing an extension for visual studio named Code Compare you can try this see if it works.

    https://visualstudiogallery.msdn.microsoft.com/dace3633-0b51-4629-85d4-c59cdce5bb3b

    Thanks,

    Sabah Shariq

    Sabah,
    Code Compare is the first of the proposed solutions I have tried and it seems to work very well within VS 2015. I like it a lot and the free version might prove to do all that I need.

    David

    Tuesday, November 10, 2015 11:41 PM
  • Thanks for Sabah Shariq and Brian Muth's help.

    Hi David,

    I think you get the solution for this issue now, am I right? If so, please mark the useful reply as the answer, so it would be helpful for other members who get the same issue as yours to research and find the answer.

    The VS has no the compared feature in default, but the extension tool provided by Sabah Shariq would be a better workaround for it. Of course, as Sabah Shariq and Brian Muth's suggestions, you could also use certain single tools like VS Code or WinMerge to compare the code files.

    Have a nice day,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 11, 2015 6:34 AM
    Moderator