Problem
Every standalone (IL2CPP) leg on the self-hosted Windows runner is failing because the MSVC C++ compiler is not present at the path Unity detected. This is a host toolchain outage, not a code regression, and it affects master as much as any pull request.
Evidence
Run 30665529494. Two standalone legs failed with the identical error, from two different Unity versions:
Building Library\Bee\artifacts\WinPlayerBuildProgram\qc86f\so38ugmnna5n.obj failed with output:
'"C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.51.36231/bin/Hostx64/x64/cl.exe"'
is not recognized as an internal or external command, operable program or batch file.
...
Player build failed
TestLaunchFailedException: Player build failed
Unity resolved the toolchain path and put it on PATH:
PATH=C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.51.36231\bin\Hostx64\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.28000.0\x64
so the version directory exists and was discovered, but cl.exe under bin\Hostx64\x64 is not executable. That is the signature of a partially completed or in-flight Visual Studio update, not of a missing install.
| leg |
result |
| Unity 2021.3.45f1 standalone |
failure -- cl.exe not recognized |
| Unity 2022.3.45f1 standalone |
failure -- cl.exe not recognized |
| Unity 2021.3/2022.3 editmode + playmode |
success (Mono; no C++ toolchain needed) |
It is a regression in the host, not the repository
The last full Unity Tests run on master, 30658003577 (ac1af7de, 19:09Z), had all three standalone legs green. The failures above began around 21:19Z. Nothing in between changed scripts/unity/run-ci-tests.ps1, any C# source, or any build configuration.
The editmode and playmode legs passing in the same runs is the clean discriminator: they run under Mono and never invoke cl.exe.
The prerequisite gate does not cover this
.github/actions/assert-unity-host-prereqs checks the Visual C++ runtime redistributables (MSVCP100.dll, VCRUNTIME140.dll, ...), which is what the Editor needs in order to launch. It does not check the Visual C++ build tools, which is what IL2CPP needs in order to compile a player.
The consequence is the expensive failure mode: the leg acquires the organization Unity build lock, consumes a scarce two-seat Unity licence, builds for roughly twenty minutes, and only then discovers the compiler is absent. A prerequisite check would fail it in seconds, before the lock is taken.
Suggested fix
- Host, immediately: repair or complete the Visual Studio C++ workload on the affected runner so
…\VC\Tools\MSVC\<version>\bin\Hostx64\x64\cl.exe exists and runs.
- Repository, to prevent recurrence: extend
assert-unity-host-prereqs to assert an executable cl.exe for the newest installed MSVC toolset (resolved with vswhere, which is the supported discovery mechanism), on the same fail-fast footing as the redistributable checks. Only the standalone legs need it, so it can be gated on matrix.test-mode == 'standalone' to avoid taxing editmode and playmode.
- Consider having the runner opt out of unattended Visual Studio updates, since an update window silently removes the compiler mid-run.
Acceptance criteria
- A runner missing an executable
cl.exe fails before Acquire organization Unity lock, not twenty minutes into an IL2CPP build.
- The failure message names the missing compiler path, rather than surfacing as
Player build failed / tests did not run.
- Editmode and playmode legs are unaffected by the new check.
Related
scripts/unity/bootstrap-windows-runner.ps1 -- the existing remediation for the runtime redistributables; the build tools are the same class of host prerequisite and belong alongside it.
Problem
Every standalone (IL2CPP) leg on the self-hosted Windows runner is failing because the MSVC C++ compiler is not present at the path Unity detected. This is a host toolchain outage, not a code regression, and it affects
masteras much as any pull request.Evidence
Run 30665529494. Two standalone legs failed with the identical error, from two different Unity versions:
Unity resolved the toolchain path and put it on
PATH:so the version directory exists and was discovered, but
cl.exeunderbin\Hostx64\x64is not executable. That is the signature of a partially completed or in-flight Visual Studio update, not of a missing install.cl.exenot recognizedcl.exenot recognizedIt is a regression in the host, not the repository
The last full
Unity Testsrun onmaster, 30658003577 (ac1af7de, 19:09Z), had all three standalone legs green. The failures above began around 21:19Z. Nothing in between changedscripts/unity/run-ci-tests.ps1, any C# source, or any build configuration.The editmode and playmode legs passing in the same runs is the clean discriminator: they run under Mono and never invoke
cl.exe.The prerequisite gate does not cover this
.github/actions/assert-unity-host-prereqschecks the Visual C++ runtime redistributables (MSVCP100.dll,VCRUNTIME140.dll, ...), which is what the Editor needs in order to launch. It does not check the Visual C++ build tools, which is what IL2CPP needs in order to compile a player.The consequence is the expensive failure mode: the leg acquires the organization Unity build lock, consumes a scarce two-seat Unity licence, builds for roughly twenty minutes, and only then discovers the compiler is absent. A prerequisite check would fail it in seconds, before the lock is taken.
Suggested fix
…\VC\Tools\MSVC\<version>\bin\Hostx64\x64\cl.exeexists and runs.assert-unity-host-prereqsto assert an executablecl.exefor the newest installed MSVC toolset (resolved withvswhere, which is the supported discovery mechanism), on the same fail-fast footing as the redistributable checks. Only the standalone legs need it, so it can be gated onmatrix.test-mode == 'standalone'to avoid taxing editmode and playmode.Acceptance criteria
cl.exefails beforeAcquire organization Unity lock, not twenty minutes into an IL2CPP build.Player build failed/tests did not run.Related
scripts/unity/bootstrap-windows-runner.ps1-- the existing remediation for the runtime redistributables; the build tools are the same class of host prerequisite and belong alongside it.