我想配置Visual Studio打开超越比较默认作为差异工具。我该怎么做呢?
当前回答
@schellack发布的答案对于大多数情况都是完美的,但我想要Beyond Compare来模拟Visual Studio在自己的合并窗口中使用的“2路合并与结果面板”视图。
这个配置隐藏了中间面板(在大多数情况下AFAIK没有使用)。
%1 %2 "" %4 /title1=%6 /title2=%7 /title3="" /title4=%9
感谢摩根
其他回答
在Visual Studio中,转到“工具”菜单,选择“选项”,展开“源控制”(在TFS环境中,单击Visual Studio Team Foundation Server),然后单击“配置用户工具”按钮。
单击Add按钮。
输入/选择以下比较选项:
扩展:. * 操作:比较 命令:C:\Program Files\Beyond比较3\BComp.exe(替换为您机器的正确路径,包括版本号) 参数:%1 %2 /title1=%6 /title2=%7
如果使用Beyond Compare Professional (3-way Merge):
扩展:. * 操作:合并 命令:C:\Program Files\Beyond比较3\BComp.exe(替换为您机器的正确路径,包括版本号) 参数:%1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9
如果使用Beyond Compare v3/v4 Standard或Beyond Compare v2 (2-way Merge):
扩展:. * 操作:合并 命令:C:\Program Files\Beyond比较3\BComp.exe(替换为您机器的正确路径,包括版本号) 参数:%1 %2 / savettarget =%4 /title1=%6 /title2=%7
如果你在Beyond Compare中使用标签
如果您以选项卡模式运行Beyond Compare,当您一次从Visual Studio中区分或合并多个文件集时,它可能会混淆。为了解决这个问题,你可以将参数/solo添加到参数的末尾;这确保了每次比较都在一个新窗口中打开,解决了选项卡的问题。
@schellack发布的答案对于大多数情况都是完美的,但我想要Beyond Compare来模拟Visual Studio在自己的合并窗口中使用的“2路合并与结果面板”视图。
这个配置隐藏了中间面板(在大多数情况下AFAIK没有使用)。
%1 %2 "" %4 /title1=%6 /title2=%7 /title3="" /title4=%9
感谢摩根
Visual Studio with Git for Windows
如果你使用GIT作为你的源代码管理系统,而不是(相当过时的)TFVC,那么Visual Studio就没有选项来配置这样的东西。 相反,它(在我看来)使用了GIT配置文件的设置。因此,如果你已经安装了GIT,可以使用Beyond Compare或任何其他第三方比较软件,它就会选择这个并开始使用它。
如果没有,那就设置一下(参见这里获得更多最新的帮助)。使用Beyond Compare 4设置Visual Studio的相关信息如下:
Open Visual Studio. Select Options from the Tools menu. Select Plug-In Settings under the Source Control branch of the left-side tree control. Select Microsoft Git Provider under Plug-In Settings on the right-hand pane. Edit the global git config file (location is OS specific for windows it's %HOMEDRIVE%%HOMEPATH%/.gitconfig. See here for info) OR if you want it to be repo specifict then after starting a project in a Git repository, edit the config file in the .git folder in the project folder. Change the config file to reflect the following changes: [diff] tool = bc4 [difftool "bc4"] cmd = \"C:\\Program Files (x86)\\Beyond Compare 4\\BComp.exe\" \"$LOCAL\" \"$REMOTE\" [merge] tool = bc4 [mergetool "bc4"] cmd = \"C:\\Program Files (x86)\\Beyond Compare 4\\BComp.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
如果使用64位安装程序,请验证可执行文件的名称。我的 是BCompare.exe
[diff]
tool = bc4
[difftool "bc4"]
cmd = \"C:\\Program Files\\Beyond Compare 4\\BCompare.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc4
[mergetool "bc4"]
cmd = \"C:\\Program Files\\Beyond Compare 4\\BCompare.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
Issues: If you create a new project and get VS to create the git repo at the same time it WILL add a load of overrides to the .git/config file forcing it to use Visual Studio again (Thanks for that MS!). SO either create the git repo via another means after the project has been setup (like via SourceTree or the command line etc...) OR edit the .git/config file (in the solution folder) and remove any overrides for the above settings. Thanks to minnow in the comments for bringing my attention to it again.
注意:我一直遇到这种情况,但我使用VS与GIT和 答案是不正确的,尽管一些评论提到了一个URL 正确的答案是不清楚的,如果我一直错过它,我 当然其他人会这样做,所以希望这将解决这个问题。
在Visual Studio 2008 +中,转到
工具菜单——>选择选项
在选项窗口——>展开源控制——>选择颠覆用户 选择超越比较
单击“确定”按钮..
64位Windows 7上的VS2013需要这些设置: 工具|选项|源码控制| Jazz源码控制
使用外部比较工具…(很容易忽略)
双向比较 可执行文件位置:C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
三向冲突比较 可执行文件位置:C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
推荐文章
- 如何在没有任何错误或警告的情况下找到构建失败的原因
- Visual Studio弹出提示:“操作无法完成”
- 为什么我在我的Excel插件中得到“无法在证书存储中找到清单签名证书”?
- Visual Studio拒绝忘记断点?
- Visual Studio展开/折叠键盘快捷键
- Visual Studio:如何在两个单独的选项卡组中看到相同的文件?
- 为什么visual studio 2012找不到我的测试?
- Visual Studio 2010 - c++项目-删除*。自卫队文件
- 如何在Visual Studio中删除未推送的外向提交?
- “无法写入文件…”因为它会覆盖输入文件。”
- 使用Visual Studio调试器在值更改时中断
- Visual Studio 2017:显示方法参考
- 为什么ReSharper想要使用'var'的一切?
- 在Visual Studio中默认从项目中删除安全警告(_CRT_SECURE_NO_WARNINGS)
- 在Visual Studio中设置“首选32位”的目的是什么?它实际上是如何工作的?