SpiecsEngine
 
Loading...
Searching...
No Matches

◆ find_msbuild()

Build.find_msbuild ( )
@brief Find MSBuild path.
@return Returns MSBuild path.

Definition at line 16 of file Build.py.

16def find_msbuild():
17
18 '''
19 @brief Find MSBuild path.
20 @return Returns MSBuild path.
21 '''
22
23 global vswhere_path
24
25 result = subprocess.run([
26 vswhere_path,
27 "-latest",
28 "-products",
29 "*",
30 "-requires",
31 "Microsoft.Component.MSBuild",
32 "-find",
33 "MSBuild\**\Bin\MSBuild.exe"],
34 capture_output = True,
35 text = True
36 )
37
38 if result.returncode == 0 and result.stdout:
39 return result.stdout.strip()
40 else:
41 raise Exception("Could not find MSBuild")
42

Referenced by main().