Fix msbuild with a msvc 'tools only' install
Taken from https://github.com/Microsoft/vswhere/wiki/Find-MSBuild
without '-products *' vswhere does not locate msbuild when installing a
tools-only (no IDE) version of the microsoft compilers.
(cherry picked from commit 0ec912a79e
)
This commit is contained in:
parent
8e301c69cb
commit
cd9b0d7cc3
|
@ -75,7 +75,7 @@ def find_msbuild_tools_path_reg():
|
||||||
vswhere = os.getenv('PROGRAMFILES')
|
vswhere = os.getenv('PROGRAMFILES')
|
||||||
vswhere += r'\Microsoft Visual Studio\Installer\vswhere.exe'
|
vswhere += r'\Microsoft Visual Studio\Installer\vswhere.exe'
|
||||||
|
|
||||||
vswhere_args = ['-latest', '-requires', 'Microsoft.Component.MSBuild']
|
vswhere_args = ['-latest', '-products', '*', '-requires', 'Microsoft.Component.MSBuild']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
lines = subprocess.check_output([vswhere] + vswhere_args).splitlines()
|
lines = subprocess.check_output([vswhere] + vswhere_args).splitlines()
|
||||||
|
|
Loading…
Reference in New Issue