diff --git a/build.bat b/build.bat index f73af6b..99fc4be 100644 --- a/build.bat +++ b/build.bat @@ -62,6 +62,22 @@ if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Cu set MSBUILD="%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" goto :FOUND_MSBUILD ) +if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" ( + set MSBUILD="%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" + goto :FOUND_MSBUILD +) +if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" ( + set MSBUILD="%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" + goto :FOUND_MSBUILD +) +if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe" ( + set MSBUILD="%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe" + goto :FOUND_MSBUILD +) +if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\MSBuild.exe" ( + set MSBUILD="%ProgramFiles%\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\MSBuild.exe" + goto :FOUND_MSBUILD +) if exist "%ProgramFiles(x86)%\MSBuild\14.0\bin" ( set MSBUILD="%ProgramFiles(x86)%\MSBuild\14.0\bin\msbuild.exe" goto :FOUND_MSBUILD diff --git a/build.ps1 b/build.ps1 index 5a93e47..0c46662 100644 --- a/build.ps1 +++ b/build.ps1 @@ -45,6 +45,18 @@ Do { elseif (Test-Path "${Env:Programfiles(x86)}\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" -PathType leaf) { $MSBUILD="${Env:Programfiles(x86)}\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" } + elseif (Test-Path "${Env:Programfiles}\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe" -PathType leaf) { + $MSBUILD="${Env:Programfiles}\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe" + } + elseif (Test-Path "${Env:Programfiles}\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" -PathType leaf) { + $MSBUILD="${Env:Programfiles}\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" + } + elseif (Test-Path "${Env:Programfiles}\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\MSBuild.exe" -PathType leaf) { + $MSBUILD="${Env:Programfiles}\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\MSBuild.exe" + } + elseif (Test-Path "${Env:Programfiles}\Microsoft Visual Studio\2022\Preview\Msbuild\Current\Bin\MSBuild.exe" -PathType leaf) { + $MSBUILD="${Env:Programfiles}\Microsoft Visual Studio\2022\Preview\Current\Bin\MSBuild.exe" + } elseif (Test-Path "${Env:Programfiles(x86)}\MSBuild\14.0\bin") { $MSBUILD="${Env:Programfiles(x86)}\MSBuild\14.0\bin\msbuild.exe" }