{"record":{"id":"bc2d7050f094e024","repo":"Unity-Technologies/UnityCsReference","slug":"toolname-does-not-appear-to-be-built-in-il2cppf","errorCode":null,"errorMessage":"{toolName} does not appear to be built in {il2CppFolder}","messagePattern":"(.+?) does not appear to be built in (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs","lineNumber":589,"sourceCode":"            if (isDevelopmentLocation)\n            {\n                // Locating the correct development build to use is a little tricky.  Complications come from\n                // 1) We don't know if the Debug or Release build is desired.  To overcome this we will pick whichever was modified most recently\n                // 2) We don't know if the published or non-published build is desired.  Again, we'll use whichever was modified most recently\n                // 3) Published builds for all platforms may or may not be built.  We need to make sure not to pick a build for a different platform\n\n                // Note that this logic will intentionally avoid checking for an expected TFM.  This is a dev build.  Using w/e is newest is probably\n                // the most robust and maintainable approach.\n\n                var toolBinDirectory = Path.Combine(il2CppFolder, toolName, \"bin\").ToNPath();\n#pragma warning disable UA2001 // The Banned API Analyzer produces compile errors for any new Linq code. This pre-existing usage has been suppressed, but should be rewritten if possible.\n                var candidates = toolBinDirectory.Files($\"*{expectedToolExecutableName}\", recurse: true)\n#pragma warning restore UA2001\n                    .OrderByDescending(f => f.GetLastWriteTimeUtc())\n                    .ToArray();\n\n                if (candidates.Length == 0)\n                    throw new InvalidOperationException($\"{toolName} does not appear to be built in {il2CppFolder}\");\n\n                var expectedPublishDirectoryName = BinaryDirectoryForPlatform(platform).ToNPath();\n\n                foreach (var candidate in candidates)\n                {\n                    // Examples :\n                    // 1)   il2cpp/bin/Release/<tfm>/il2cpp.exe\n                    // 2)   il2cpp/bin/Debug/<tfm>/il2cpp.exe\n                    if (candidate.Parent.Parent.Parent.FileName == \"bin\")\n                    {\n                        // Found a non-published build\n                        return candidate.ToString();\n                    }\n\n                    // Examples :\n                    // 1)   il2cpp/bin/Release/<tfm>/<platform dir>/publish/il2cpp.exe\n                    // 2)   il2cpp/bin/Debug/<tfm>/<platform dir>/publish/il2cpp.exe\n                    if (candidate.Parent.FileName == \"publish\" && candidate.Parent.Parent.FileName == expectedPublishDirectoryName)","sourceCodeStart":571,"sourceCodeEnd":607,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs#L571-L607","documentation":"Thrown when locating an IL2CPP tool (e.g. il2cpp.exe) inside a development/source checkout of the IL2CPP folder. The code searches <il2CppFolder>/<toolName>/bin recursively for an executable matching the expected name; if zero candidates are found it assumes the tool was never built there.","triggerScenarios":"Running from a dev IL2CPP location (isDevelopmentLocation == true) where toolName/bin does not exist or contains no file matching *<expectedToolExecutableName>; the tool project has not been compiled, or the checkout is incomplete.","commonSituations":"Building the editor from a source enlistment where the IL2CPP submodule hasn't been built; pointing the dev override at a stale or partial clone; renaming/moving the tool project so the bin output path changed.","solutions":["Build the IL2CPP toolchain in the dev enlistment (e.g. run the bee/build script that produces <toolName>/bin/<config>/<tfm>/<exe>).","Verify il2CppFolder resolves to the correct source root containing the tool project.","If not doing dev builds, unset the dev-override env/setting so the deploy location is used instead."],"exampleFix":"/* no source edit; environment fix */\n// before: IL2CPP dev folder points at un-built checkout\n// after: build il2cpp toolchain first\n//   bee il2cpp::il2cpp\n// then retry the editor build","handlingStrategy":"validation","validationCode":"var binDir = Path.Combine(il2CppFolder, toolName, \"bin\");\nif (!Directory.Exists(binDir) || !Directory.EnumerateFiles(binDir, \"*\" + expectedToolExecutableName, SearchOption.AllDirectories).Any())\n    throw new InvalidOperationException($\"Build the {toolName} toolchain in {il2CppFolder} first.\");","typeGuard":null,"tryCatchPattern":"try { var exe = ResolveToolExecutable(...); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"does not appear to be built\"))\n{ ReportDevBuildMissing(ex); throw; }","preventionTips":["Run the bee build for the IL2CPP toolchain before launching the editor from a dev enlistment.","Keep the dev IL2CPP folder override unset when not doing dev builds."],"tags":["il2cpp","dev-build","toolchain","bee"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}