我想配置Visual Studio打开超越比较默认作为差异工具。我该怎么做呢?
当前回答
BComp.exe也可以在多选项卡场景下工作,所以没有必要添加/solo,除非你真的想为每个文件比较单独的窗口。在Beyond Compare 3和4上测试/验证。寓意:使用BComp.exe,而不是BCompare.exe,用于VS外部比较工具配置。
其他回答
不能评论,因为我的声誉评分很低。
这是回溯机链接到弗雷斯基的链接
如果您正在使用TFS,您可以在Team Foundation -通用命令和参数值中的diff/merge配置中找到更多信息
介绍如何配置以下工具:
WinDiff DiffDoc(适用于Word文件) WinMerge 无以伦比 KDiff3 Araxis 比较它! SourceGear DiffMerge 无与伦比3 TortoiseMerge 视觉SlickEdit
64位Windows 7上的VS2013需要这些设置: 工具|选项|源码控制| Jazz源码控制
使用外部比较工具…(很容易忽略)
双向比较 可执行文件位置:C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
三向冲突比较 可执行文件位置:C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
我使用BC3作为我的git差异,但我也会将vscode添加到有用的git差异工具列表中。有些用户更喜欢vscode而不是vs ide体验。
使用VS Code的Git差异
git config --global diff.tool vscode
git config --global difftool.vscode.cmd "code --wait --diff $LOCAL $REMOTE"
每隔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似乎没有缓存键,所以会立即生效。
推荐文章
- 使用不同的Web。在开发和生产环境中进行配置
- 是否有一种方法可以在Visual Studio中删除一行而不剪切它?
- Microsoft Visual Studio的推荐插件
- Visual Studio: ContextSwitchDeadlock
- Visual Studio:如何打破处理异常?
- VS 2017 Git本地提交数据库。每次提交时锁定错误
- 无法启动IIS Express Web服务器,注册URL失败,访问被拒绝
- 如何下载Visual Studio社区版2015(不是2017)
- 查找和替换-添加回车符或换行符
- Visual Studio Community和其他付费版本的区别是什么?
- "输出类型为类库的项目不能直接启动"
- “无法在证书存储区中找到清单签名证书”-即使添加了新密钥
- 目标文件中无法解析的外部符号
- Visual Studio移动项目到不同的文件夹
- 如何在。net中创建和使用资源