Skip to content

Commit ac8cc90

Browse files
committed
wip review comments
1 parent 84ac62b commit ac8cc90

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

frontend.bat

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ rem :: https://github.com/3F/hMSBuild/issues/8
458458
set vswfilter=!vswPriority!
459459

460460
:_vswAttempt
461-
call :dbgprint "attempts with filter: " vswfilter vswPreRel vswbin
461+
call :dbgprint "attempts with filter: " vswfilter vswPreRel
462+
call :dbgprint " using: " vswbin
462463

463464
set "vspath=" & set "vsver="
464465
for /F "usebackq tokens=1* delims=: " %%a in (`"!vswbin!" -nologo !vswPreRel! -requires !vswfilter! Microsoft.Component.MSBuild`) do (
@@ -523,17 +524,17 @@ for /F "tokens=1,2 delims=." %%a in ("!vsver!") do (
523524
rem https://github.com/3F/hMSBuild/issues/3
524525
set vsver=%%~a.0
525526
)
526-
REM Workaround for VS2019, may use 'vswhere -find' instead
527-
if !vsver! geq 16.0 set vsver=Current
528-
set _msbp=!vspath!\MSBuild\!vsver!\Bin
527+
REM VS2019 changes the path
528+
if !vsver! geq 16 set vsver=Current
529+
530+
if not exist "!vspath!\MSBuild\!vsver!\Bin" set "%3=" & exit /B 0
529531

532+
set _msbp=!vspath!\MSBuild\!vsver!\Bin
530533
call :dbgprint "found path via vswhere: " _msbp
531534

532-
if not defined notamd64 (
533535
if exist "!_msbp!\amd64" (
534536
call :dbgprint "found /amd64"
535-
set _msbp=!_msbp!\amd64
536-
)
537+
set _msbp=!_msbp!\amd64
537538
)
538539
call :msbfound _msbp _msbp
539540

@@ -609,7 +610,7 @@ if not defined notamd64 (
609610

610611
:: 7z & amd64\msbuild - https://github.com/3F/vsSolutionBuildEvent/issues/38
611612
set _noamd=!_msbp:Framework64=Framework!
612-
set _noamd=!_noamd:amd64=!
613+
set _noamd=!_noamd:\amd64=!
613614

614615
if exist "!_noamd!" (
615616
call :dbgprint "Return 32bit version because of -notamd64 key."

0 commit comments

Comments
 (0)