We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent319dfe4 commitf1229bdCopy full SHA for f1229bd
setup.py
@@ -324,6 +324,20 @@ def _install_packages(self):
324
325
def_find_msbuild_tool(self,tool="msbuild.exe",use_windows_sdk=False):
326
"""Return full path to one of the Microsoft build tools"""
327
+
328
+# trying to search path with help of vswhere when MSBuild 15.0 and higher installed.
329
+ifuse_windows_sdk==False:
330
+try:
331
+basePathes=subprocess.check_output(
332
+ ["tools\\vswhere\\vswhere.exe","-latest",
333
+"-version","[15.0, 16.0)",
334
+"-requires","Microsoft.Component.MSBuild",
335
+"-property","InstallationPath"]).splitlines()
336
+iflen(basePathes):
337
+returnos.path.join(basePathes[0].decode(sys.stdout.encodingor"utf-8"),"MSBuild","15.0","Bin","MSBuild.exe")
338
+except:
339
+pass# keep trying to search by old method.
340
341
# Search in PATH first
342
path=spawn.find_executable(tool)
343
ifpath: