比较Visual Studio中的两个文件

本文介绍了如何在不使用TFS的情况下,在Visual Studio中比较两个文件。讨论了内置的比较工具,推荐了WinMerge作为替代方案,并提到了VSCommands扩展以及如何通过命令行或Visual Studio的命令窗口来执行文件比较。
摘要由CSDN通过智能技术生成

本文翻译自: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 ,并使用方便的文件名完成:

使用Visual Studio命令窗口中的Tools.DiffFiles

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值