我想配置Visual Studio打开超越比较默认作为差异工具。我该怎么做呢?
当前回答
我使用VS 2017与Git托管的项目在visualstudio.com托管(msdn)
上面的链接为我工作与“GITHUB for WINDOWS”指令。
http://www.scootersoftware.com/support.php?zz=kb_vcs#githubwindows
配置文件位于“c:\users\username\”的位置。gitconfig”,我只是根据我的情况将BC4更改为BC3,并使用适当的路径:
C:/Program Files (x86)/Beyond Compare 3/bcomp.exe
其他回答
在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添加到参数的末尾;这确保了每次比较都在一个新窗口中打开,解决了选项卡的问题。
64位Windows 7上的VS2013需要这些设置: 工具|选项|源码控制| Jazz源码控制
使用外部比较工具…(很容易忽略)
双向比较 可执行文件位置:C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
三向冲突比较 可执行文件位置:C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
每隔6个月,每当Visual Studio的新版本出来,或者我移动电脑,或者有新成员加入团队时,我就会厌倦这样做。所以,PowerShell:
# .Synopsys
# Sets up Beyond Compare professional as Diff tool for all instances of Visual Studio on this PC
# If you don't use TFS, change the sccProvider as appropriate
[CmdLetBinding()]
param(
$bcPath = 'C:\Program Files (x86)\Beyond Compare 3\BComp.exe',
$sccProvider = 'TeamFoundation'
)
$ErrorActionPreference = 'stop';
$baseKey = 'REGISTRY::\HKCU\Software\Microsoft\VisualStudio\*'
function SetRegKeyProperties($keyPath, [hashtable]$keyProps){
if(!(Test-Path $keyPath)){
Write-Verbose "Creating $keyPath"
# Force required here to recursively create registry path
[void] (new-item $keyPath -Type:Directory -Force);
}
foreach($prop in $keyProps.GetEnumerator()){
Set-ItemProperty -Path:$keyPath -Name:$prop.Key -Value:$prop.Value;
}
}
$configBases = dir $baseKey | ? { $_.PSChildName -match '^\d+\.\d$' }
foreach($item in $configBases){
Write-Host "Configuring $item"
$diffToolsKey = Join-Path $item.PSPath "$sccProvider\SourceControl\DiffTools"
SetRegKeyProperties (Join-path $diffToolsKey '.*\Compare') @{Command=$bcPath;Arguments='%1 %2 /title1=%6 /title2=%7'}
SetRegKeyProperties (Join-path $diffToolsKey '.*\Merge') @{Command=$bcPath;Arguments='%1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9'}
}
在我的机器上工作。YMMV。不保修,不退款。VS似乎没有缓存键,所以会立即生效。
如果您正在使用TFS,您可以在Team Foundation -通用命令和参数值中的diff/merge配置中找到更多信息
介绍如何配置以下工具:
WinDiff DiffDoc(适用于Word文件) WinMerge 无以伦比 KDiff3 Araxis 比较它! SourceGear DiffMerge 无与伦比3 TortoiseMerge 视觉SlickEdit
不能评论,因为我的声誉评分很低。
这是回溯机链接到弗雷斯基的链接
推荐文章
- 如何在没有任何错误或警告的情况下找到构建失败的原因
- 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位”的目的是什么?它实际上是如何工作的?