Skip to content
Latchkey

Unity "IL2CPP did not run properly" in CI

IL2CPP converts your IL to C++ and compiles it. When it exits non-zero, Unity reports that IL2CPP did not run properly. The underlying error is a missing toolchain, an editor module, or code IL2CPP cannot convert.

What this error means

A player build using the IL2CPP scripting backend fails with "Il2CppCore did not run properly" or "IL2CPP error for ..." and the build does not produce a binary.

unity
Building Library/Bee/artifacts/... failed
Error: Il2CppCore did not run properly!
Exception: C++ code builder is unable to build C++ code.

Common causes

The target build module is not installed

IL2CPP needs the platform module (for example the Linux IL2CPP or Android module). A base editor image without it cannot run the converter.

A C++ toolchain or NDK is missing

IL2CPP compiles generated C++, so a missing compiler (or Android NDK for mobile) breaks the final build step.

How to fix it

Use an image that includes the IL2CPP module

  1. Select a GameCI editor image variant that bundles the IL2CPP/platform module you target.
  2. Confirm the matching toolchain (or NDK) is present for that platform.
  3. Re-run the IL2CPP build.
.github/workflows/ci.yml
- uses: game-ci/unity-builder@v4
  with:
    targetPlatform: StandaloneLinux64
    customImage: unityci/editor:ubuntu-2022.3.21f1-linux-il2cpp-3

Validate against Mono first

Build once with the Mono backend to confirm code correctness, then isolate IL2CPP-specific toolchain or stripping issues.

How to prevent it

  • Pick an editor image that includes the IL2CPP module for your target.
  • Provision the Android NDK when building mobile with IL2CPP.
  • Keep managed stripping levels conservative to avoid conversion failures.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →