Skip to content

Commit

Permalink
Use SDK msbuild to build wrappers
Browse files Browse the repository at this point in the history
On windows, the use of run.exe, config.json, and msbuild.cmd uses
msbuild.exe on the path. This change will build wrappers using the
local SDK via "dotnet msbuild", bypassing run.exe. Run.exe will go
away entirely with the move from buildtools to arcade, so other build
invocatios should follow suit.
  • Loading branch information
sbomer committed Jul 12, 2018
1 parent 7d7b0a8 commit 7430974
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ if defined __BuildAgainstPackagesArg (
@if defined _echo @echo on

set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch%
REM As we move from buildtools to arcade, __RunArgs should be replaced with __msbuildArgs
set __msbuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch%

if defined __ToolsetDir (
rem arm64 builds currently use private toolset which has not been released yet
Expand Down Expand Up @@ -156,6 +158,12 @@ REM ===
REM =========================================================================================
call "%__ProjectDir%\init-tools.cmd"
@if defined _echo @echo on
set "__ToolsDir=%__ProjectDir%\Tools"
set "__DotnetHost=%__ToolsDir%\dotnetcli\dotnet.exe"
if not exist "%__DotnetHost%" (
echo %__DotnetHost% not found after init-tools.
exit /b 1
)

REM =========================================================================================
REM ===
Expand Down Expand Up @@ -424,7 +432,8 @@ set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"

call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\tests\runtest.proj -BuildWrappers -MsBuildEventLogging=" " -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %TargetsWindowsArg% %__unprocessedBuildArgs%
REM Build wrappers using the local SDK's msbuild. As we move to arcade, the other builds should be moved away from run.exe as well.
call %__DotnetHost% msbuild %__ProjectDir%\tests\runtest.proj /p:BuildWrappers=true !__msbuildLog! !__msbuildWrn! !__msbuildErr! %__msbuildArgs% %__unprocessedBuildArgs%
if errorlevel 1 (
echo Xunit Wrapper build failed
exit /b 1
Expand Down

0 comments on commit 7430974

Please sign in to comment.