如何在塔中使用Visual Studio作为合并工具

时间:2018-07-23 15:22:04

标签: git visual-studio visual-studio-2017 git-tower

我想使用Visual Studio作为Tower中的默认合并工具。我查看了安装程序随附的docs和comparetools.jsons,但是不幸的是,vsDiffMerge /?并未提供有关将参数放在何处的任何有用信息。

1 个答案:

答案 0 :(得分:1)

要将Visual Studio 2017配置为Tower中的合并工具,请将vs2017.json放在以下目录中:%LOCALAPPDATA%\fournova\Tower\Settings\CompareTools\

设置以下内容,并在需要时调整Visual Studio搜索路径:

{
  "DisplayName":           "Visual Studio 2017",
  "MinimumVersion":        "",
  "SupportsDiffChangeset": true,
  "SupportsDirectoryDiff": false,
  "DiffToolArguments":     "\"$LOCAL\" $REMOTE /t",
  "MergeToolArguments":    "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" /m",
  "ApplicationRegistryIdentifiers": [
  ],
  "ApplicationPaths": [
      "%ProgramFiles(x86)%\\Microsoft Visual Studio\\Preview\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe",
      "%ProgramFiles(x86)%\\Microsoft Visual Studio\\Preview\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe",
      "%ProgramFiles(x86)%\\Microsoft Visual Studio\\Preview\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe",  
      "%ProgramFiles(x86)%\\Microsoft Visual Studio\\Preview\\TeamExplorer\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe",  
      "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe",
      "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe",
      "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe",
      "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\TeamExplorer\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe"
  ]
}

重新启动Tower,然后在首选项窗口中选择Visual Studio:

enter image description here

另请参阅: