@@ -493,10 +493,6 @@ goto :eof
493493:havemsbuild
494494set _nrswitch = /nr:false
495495
496- rem uncomment to use coreclr msbuild not ready yet!!!!
497- rem set _msbuildexe=%~dp0Tools\CoreRun.exe %~dp0Tools\MSBuild.exe
498- rem set _nrswitch=
499-
500496:: See <http://www.appveyor.com/docs/environment-variables>
501497if defined APPVEYOR (
502498rem See< http://www.appveyor.com/docs/build-phase>
@@ -543,7 +539,8 @@ if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" (
543539call %~dp0 init-tools.cmd
544540)
545541
546- set _dotnetexe = %~dp0 Tools\dotnetcli\dotnet.exe
542+ set _dotnetcliexe = %~dp0 Tools\dotnetcli\dotnet.exe
543+ set _dotnet20exe = %~dp0 Tools\dotnet20\dotnet.exe
547544set NUGET_PACKAGES = %~dp0 Packages
548545
549546set _fsiexe = " packages\FSharp.Compiler.Tools.4.1.5\tools\fsi.exe"
@@ -569,19 +566,9 @@ if "%BUILD_PROTO%" == "1" (
569566
570567if " %BUILD_PROTO_WITH_CORECLR_LKG% " == " 1" (
571568
572- pushd .\lkg\fsc& %_dotnetexe% restore& popd & if ERRORLEVEL 1 echo Error:%errorlevel% dotnet restore failed& goto :failure
573- pushd .\lkg\fsi& %_dotnetexe% restore& popd & if ERRORLEVEL 1 echo Error:%errorlevel% dotnet restore failed& goto :failure
574- pushd .\lkg\fsc& %_dotnetexe% publish project.json --no-build -o%~dp0 Tools\lkg -r!_architecture! & popd & if ERRORLEVEL 1 echo Error: dotnet publish failed& goto :failure
575- pushd .\lkg\fsi& %_dotnetexe% publish project.json --no-build -o%~dp0 Tools\lkg -r!_architecture! & popd & if ERRORLEVEL 1 echo Error: dotnet publish failed& goto :failure
576-
577569echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto
578570%_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto
579571@ if ERRORLEVEL1 echo Error: compiler proto build failed&& goto :failure
580-
581- echo %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo
582- %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo
583- @ if ERRORLEVEL1 echo Error: NGen of proto failed&& goto :failure
584-
585572 )
586573
587574if " %BUILD_PROTO_WITH_CORECLR_LKG% " == " 0" (
@@ -592,12 +579,11 @@ if "%BUILD_PROTO%" == "1" (
592579echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto
593580%_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto
594581@ if ERRORLEVEL1 echo Error: compiler proto build failed&& goto :failure
595-
596- echo %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo
597- %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo
598- @ if ERRORLEVEL1 echo Error: NGen of proto failed&& goto :failure
599-
600582 )
583+
584+ echo %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo
585+ %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo
586+ @ if ERRORLEVEL1 echo Error: NGen of proto failed&& goto :failure
601587)
602588
603589echo ---------------- Done with proto, starting build ------------------------
@@ -829,8 +815,8 @@ if "%TEST_CORECLR_COREUNIT_SUITE%" == "1" (
829815set OUTPUTFILE = !RESULTSDIR! \test-coreclr-coreunit-output.log
830816set ERRORFILE = !RESULTSDIR! \test-coreclr-coreunit-errors.log
831817
832- echo " %_dotnetexe % " " %~dp0 tests\testbin\!BUILD_CONFIG! \coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
833- " %_dotnetexe % " " %~dp0 tests\testbin\!BUILD_CONFIG! \coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
818+ echo " %_dotnetcliexe % " " %~dp0 tests\testbin\!BUILD_CONFIG! \coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
819+ " %_dotnetcliexe % " " %~dp0 tests\testbin\!BUILD_CONFIG! \coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
834820
835821if ERRORLEVEL 1 (
836822echo -----------------------------------------------------------------
@@ -852,8 +838,8 @@ if "%TEST_CORECLR_FSHARP_SUITE%" == "1" (
852838set OUTPUTFILE =
853839set ERRORFILE =
854840set XMLFILE = !RESULTSDIR! \test-coreclr-fsharp-results.xml
855- echo " %_dotnetexe % " " %~dp0 tests\testbin\!BUILD_CONFIG! \coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
856- " %_dotnetexe % " " %~dp0 tests\testbin\!BUILD_CONFIG! \coreclr\FSharp.Tests.FSharpSuite.DrivingCoreCLR\FSharp.Tests.FSharpSuite.DrivingCoreCLR.dll" !WHERE_ARG_NUNIT!
841+ echo " %_dotnetcliexe % " " %~dp0 tests\testbin\!BUILD_CONFIG! \coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
842+ " %_dotnetcliexe % " " %~dp0 tests\testbin\!BUILD_CONFIG! \coreclr\FSharp.Tests.FSharpSuite.DrivingCoreCLR\FSharp.Tests.FSharpSuite.DrivingCoreCLR.dll" !WHERE_ARG_NUNIT!
857843
858844if errorlevel 1 (
859845echo -----------------------------------------------------------------