File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Maverick.PCF.Builder/Scripts Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1- Function Find-MsBuild ([int ] $MaxVersion = 2019 )
1+ Function Find-MsBuild ([int ] $MaxVersion = 2022 )
22{
3+ $agentPath2022 = " $Env: programfiles \Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\"
4+ $devPath2022 = " $Env: programfiles \Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
5+ $proPath2022 = " $Env: programfiles \Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\"
6+ $communityPath2022 = " $Env: programfiles \Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\"
37 $agentPath2019 = " $Env: programfiles (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\"
48 $devPath2019 = " $Env: programfiles (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"
59 $proPath2019 = " $Env: programfiles (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\"
1216 $fallback2013Path = " ${Env: ProgramFiles(x86)} \MSBuild\12.0\Bin\"
1317 $fallbackPath = " C:\Windows\Microsoft.NET\Framework\v4.0.30319"
1418
19+ If ((2022 -le $MaxVersion ) -And (Test-Path $agentPath2022 )) { return $agentPath2022 }
20+ If ((2022 -le $MaxVersion ) -And (Test-Path $devPath2022 )) { return $devPath2022 }
21+ If ((2022 -le $MaxVersion ) -And (Test-Path $proPath2022 )) { return $proPath2022 }
22+ If ((2022 -le $MaxVersion ) -And (Test-Path $communityPath2022 )) { return $communityPath2022 }
1523 If ((2019 -le $MaxVersion ) -And (Test-Path $agentPath2019 )) { return $agentPath2019 }
1624 If ((2019 -le $MaxVersion ) -And (Test-Path $devPath2019 )) { return $devPath2019 }
1725 If ((2019 -le $MaxVersion ) -And (Test-Path $proPath2019 )) { return $proPath2019 }
You can’t perform that action at this time.
0 commit comments