本文翻译自:Compare two files in Visual Studio
I saw new comparsion tool in VS 2012 for comparing two files or two versions of file. 我在VS 2012中看到了新的比较工具,用于比较两个文件或两个版本的文件。 I like it. 我喜欢。 But when I tried to find it I can't because I don't use TFS. 但是当我试图找到它时我不能因为我不使用TFS。 Is there a way how can I just compare two files with builtin feature in VS but without TFS? 有没有办法如何比较VS中内置功能但没有TFS的两个文件?
#1楼
参考:https://stackoom.com/question/vhmY/比较Visual-Studio中的两个文件
#2楼
I have always been a fan of WinMerge which is an open source project. 我一直是WinMerge的粉丝,WinMerge是一个开源项目。 You can plug it into Visual Studio fairly easily. 您可以非常轻松地将其插入Visual Studio。
http://blog.paulbouwer.com/2010/01/31/replace-diffmerge-tool-in-visual-studio-team-system-with-winmerge/ http://blog.paulbouwer.com/2010/01/31/replace-diffmerge-tool-in-visual-studio-team-system-with-winmerge/
will show you how to do this 会告诉你如何做到这一点
#3楼
You can try VSCommands extension from Visual Studio Gallery . 您可以从Visual Studio库中尝试VSCommands扩展 。 Latest release allows you to select two file and compare them: 最新版本允许您选择两个文件并进行比较:
#4楼
I had this problem as well. 我也有这个问题。 No TFS, but I found this article helpful . 没有TFS,但我发现这篇文章很有帮助 。
Specifically, step 1b. 具体而言,步骤1b。
Open a Visual Studio command prompt and navigate to the Common7/IDE folder and type 打开Visual Studio命令提示符并导航到Common7 / IDE文件夹并键入
tf diff /configure
#5楼
There is also a Visual Studio extension called CompareFiles , which does nothing else but adding the "Compare Files" entry to the solution explorer context menu. 还有一个名为CompareFiles的Visual Studio扩展,除了将“Compare Files”条目添加到解决方案资源管理器上下文菜单之外 ,它什么都不做。 It invokes the built-in Visual Studio diff tool. 它调用内置的Visual Studio diff工具。
Just in case that someone (like me) doesn't want to install an all-in-one extension like VSCommands... 万一有人(像我一样)不想安装像VSCommands这样的一体化扩展......
#6楼
You can invoke devenv.exe /diff list1.txt list2.txt
from the command prompt or, if a Visual Studio instance is already running, you can type Tools.DiffFiles
in the Command window, with a handy file name completion: 您可以从命令提示符调用devenv.exe /diff list1.txt list2.txt
,或者,如果Visual Studio实例已在运行,您可以在命令窗口中键入Tools.DiffFiles
,并使用方便的文件名完成: