Closed chrpai closed 1 week ago
Yes, it would be totally ok! Feel free to send a PR and I'll merge and ship it (provided both work just like the others).
Thanks!
To do this properly you should use vswhere as there are many possible locations for visual studio; e.g. on my machine:
❯ "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -property installationPath
C:\Program Files\Microsoft Visual Studio\2022\Preview
(I only have the preview of 2022 installed so specifying -prerelease
is important.)
Also, you should only need ...\Git\cmd\git.exe
and not ...\Git\mingw64\bin\git.exe
, unless I'm missing something.
Yep, likely just a matter of packaging the tool and invoking it from MSBuild.
you're on a roll @gitfool, perhaps you can tackle this one too! 🙏
Describe the Bug
I'm building a project that uses GitInfo. On a clean machine with only VS it fails to detect git. Upon reviewing GitInfo.targets I see:
VS 2022 by default installs Git to two locations. Would it be acceptable to update the targets to use these locations if found?
Directory of C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd
11/30/2023 01:48 PM 45,048 git.exe 1 File(s) 45,048 bytes
Directory of C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw64\bin
11/30/2023 01:48 PM 3,806,712 git.exe 1 File(s) 3,806,712 bytes