From d6a82ad4f73f89d09d71687ea92da41748739fbf Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Sat, 2 Nov 2024 17:06:02 -0300 Subject: [PATCH] Add vswhere fallback to locate git provided by VS Fixes #324 --- src/GitInfo/build/GitInfo.targets | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/GitInfo/build/GitInfo.targets b/src/GitInfo/build/GitInfo.targets index d1c166f..7c7e6bf 100644 --- a/src/GitInfo/build/GitInfo.targets +++ b/src/GitInfo/build/GitInfo.targets @@ -93,6 +93,8 @@ %%cI %cI + + <_VsWherePath>$(ProgramFiles(x86))\Microsoft Visual Studio\Installer\vswhere.exe @@ -915,6 +917,26 @@ C:\msysgit\bin\git.exe + + + <_VsWherePath>$(MSBuildProgramFiles32)\Microsoft Visual Studio\Installer\vswhere.exe + <_VsWhere Condition="Exists('$(_VsWherePath)')">$(_VsWherePath) + <_VsGitPath>\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw64\bin\git.exe + + + + + + + + + + + "%(_VsDir.Identity)$(_VsGitPath)" + +