Use Visual Studio 2022 as merge tool in Tower
Tags: git, tower, tipsntricks, visualstudio
Published: 2021-12-14 18:51:24

---
title: Use Visual Studio 2022 as merge tool in Tower
published: true
date: 2021-11-26 14:42:54 UTC
tags: git,tower,TipsnTricks,visualstudio
canonical_url: https://jessehouwing.net/use-visual-studio-2022-as-merge-tool-in-tower/
---

 ![Use Visual Studio 2022 as merge tool in Tower](https://jessehouwing.net/content/images/2021/11/19340354430_4329b4584e_k-1-.jpg)

I've been using Tower as my Git client in Windows for quite a while now, it's great in many aspects, but it doesn't ship with any Diff/Merge capabilities. It relies on 3rd party tool to supply that feature. It comes with a long list of supported tools, but my two default editor isn't part of that list: Visual Studio.

To enable Visual Studio 2017 to 2022 in Tower all you need to do is put the following file here `%LOCALAPPDATA%\fournova\Tower\Settings\CompareTools\vs2022.json`:

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

It should automatically detect the Enterprise, Professional or Community Edition of Visual Studio 2017, 2019, 2022 including previews or the stand-alone installation of Team Explorer.

> **Note** : Visual Studio 2022 is now an x64 application and is installed under `c:\Program Files` now, no longer under `c:\Program Files (x86)`.

Make sure you update your preferences in Tower to select it (you need to restart Tower to detect your custom merge tool changes):

![Use Visual Studio 2022 as merge tool in Tower](https://jessehouwing.net/content/images/2021/11/image.png)
_Select Visual Studio 2017-2022 as your Diff and Merge tool._

Due to changes in how Microsoft stores the Installation Path it's not easy to grab this from the registry, so if you're not using the default installation path, you may need to update the search paths above.

_Visual Studio not your tool of choice? It's pretty [straightforward to add your own](https://www.git-tower.com/help/win/integration/custom-diff-tools)!_

Photo Credits: [Phil Dolby](https://www.flickr.com/photos/126654539@N08/19340354430).