When restoring via Build.proj the argument nodeReuse is not respected outside CI. Outside of CI the build defaults to using a quiet restore and hence shells out to MSBuild vs. using the MSBuild task. In doing so the nodeReuse argument originally passed to MSBuild is lost.
<Exec Command='$(_MSBuildCmd) "@(ProjectToBuild)" /nologo /m /v:quiet /t:Restore $(_SolutionBuildPropsCmdLine) /p:__BuildPhase=SolutionRestore'
Condition="'$(RestoreUsingNuGetTargets)' != 'true' and '$(Restore)' == 'true' and '$(_QuietRestore)' == 'true'" StandardOutputImportance="normal" />
This is very problematic for Roslyn. In our bootstrap phase we pass the property $(BootstrapBuildPath) around to change where the C# compiler is loaded from. The restore phase does not propogate this property nor does it propogate nodeReuse. Hence the first invocation of MSBuild for restore uses the standard C# compiler path, it hangs around and our subsequent invocation can't override as the C# task has already been loaded and our bootstrap is broken.
When restoring via
Build.projthe argument nodeReuse is not respected outside CI. Outside of CI the build defaults to using a quiet restore and hence shells out to MSBuild vs. using the MSBuild task. In doing so the nodeReuse argument originally passed to MSBuild is lost.This is very problematic for Roslyn. In our bootstrap phase we pass the property
$(BootstrapBuildPath)around to change where the C# compiler is loaded from. The restore phase does not propogate this property nor does it propogate nodeReuse. Hence the first invocation of MSBuild for restore uses the standard C# compiler path, it hangs around and our subsequent invocation can't override as the C# task has already been loaded and our bootstrap is broken.