Compare files on double click in Pending Changes view

后端 未结 7 1024
醉话见心
醉话见心 2020-12-04 12:48

Is there a way in visual studio to change the behavior when I double click a file in the \'Pending Changes\' view.

The default behavior is, that Visual Studio opens

7条回答
  •  自闭症患者
    2020-12-04 13:28

    VS 2019 And Beyond (hopefully)

    Building on Tereza's answer using powershell

    Run powershell as adminstrator and close Visual Studio. (you might have to wait a couple of seconds for VS to release some files) (if you copy paste make sure to send the last command, or else VS won't start)

    $instanceId = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property instanceId).Trim()
    $versionMajor = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationVersion).Trim().Substring(0,2)
    $year = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property catalog_productLineVersion).Trim()
    reg.exe load HKLM\VS$yearPrivateRegistry $env:LOCALAPPDATA\Microsoft\VisualStudio\$versionMajor.0_$instanceId\privateregistry.bin
    reg.exe add HKLM\VS$yearPrivateRegistry\Software\Microsoft\VisualStudio\$versionMajor.0_$instanceId\TeamFoundation\SourceControl\Behavior /v DoubleClickOnChange /t REG_DWORD /d 1 /f
    reg.exe unload HKLM\VS$yearPrivateRegistry
    

    This attempts to determine the major version as well.

提交回复
热议问题