Created
April 14, 2021 07:02
-
-
Save f-steff/11489012c53e19409ec7af484afe04d8 to your computer and use it in GitHub Desktop.
Get path ot installed MSBuild
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
::With MSBuild 2017 and later installed, this command will always provide the correct path to msbuild.exe | |
FOR /F "tokens=* USEBACKQ" %%F IN (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) DO ( | |
SET "msbuild.exe=%%F" | |
) | |
set msbuild.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment