{"record":{"id":"32e92bb822cbcf0f","repo":"dotnet/runtime","slug":"export-s-not-found","errorCode":null,"errorMessage":"Export '%s' not found.\n","messagePattern":"Export '(.+?)' not found\\.\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/coreclr/hosts/corerun/corerun.cpp","lineNumber":200,"sourceCode":"    if (*fptr != nullptr)\n        return true;\n#else // !TARGET_WASM\n    if (!strcmp(symbol, \"coreclr_initialize\")){\n        *fptr = (void*)coreclr_initialize;\n        return true;\n    } else if (!strcmp(symbol, \"coreclr_execute_assembly\")){\n        *fptr = (void*)coreclr_execute_assembly;\n        return true;\n    } else if (!strcmp(symbol, \"coreclr_shutdown_2\")){\n        *fptr = (void*)coreclr_shutdown_2;\n        return true;\n    } else if (!strcmp(symbol, \"coreclr_set_error_writer\")){\n        *fptr = (void*)coreclr_set_error_writer;\n        return true;\n    }\n#endif // !TARGET_WASM\n\n    pal::fprintf(stderr, W(\"Export '%s' not found.\\n\"), symbol);\n    return false;\n}\n\nclass logger_t final\n{\n    const char* _exePath;\n    int _propertyCount;\n    const char** _propertyKeys;\n    const char** _propertyValues;\n    const char* _managedAssembly;\n    int _argc;\n    const char** _argv;\npublic:\n    logger_t(\n        const char* exePath,\n        int propertyCount, const char** propertyKeys, const char** propertyValues,\n        const char* managedAssembly, int argc, const char** argv)\n    : _exePath{ exePath }","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/dotnet/runtime/blob/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/hosts/corerun/corerun.cpp#L182-L218","documentation":"Printed by try_get_export() in corerun.cpp at src/coreclr/hosts/corerun/corerun.cpp:200 when pal::get_module_symbol returns nullptr for a requested CoreCLR export symbol (coreclr_initialize, coreclr_execute_assembly, coreclr_shutdown_2, coreclr_set_error_writer). Without these entry points the host cannot drive the runtime.","triggerScenarios":"The loaded coreclr module (libcoreclr.so / coreclr.dll) does not export the requested symbol — a stale or mismatched coreclr build, a stripped binary, or loading the wrong shared library.","commonSituations":"Build mismatch between corerun and coreclr; coreclr path pointed at a stripped/minified libcoreclr; a corrupted build; using a coreclr that predates an export the host expects.","solutions":["Rebuild coreclr and corerun together so exported symbols match.","Verify the symbol exists: `nm -D libcoreclr.so | grep coreclr_initialize` (Linux) or `dumpbin /exports coreclr.dll` (Windows).","Confirm the coreclr path passed to corerun is the freshly built module.","Do not strip coreclr exports when packaging."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const char* required[] = {\"coreclr_initialize\", \"coreclr_execute_assembly\",\n                       \"coreclr_shutdown_2\"};\nfor (auto s : required) {\n    if (pal::get_module_symbol(coreclr_mod, s) == nullptr) {\n        pal::fprintf(stderr, W(\"coreclr missing export '%s' -- rebuild/relink\\n\"), s);\n        return EXIT_FAILURE;\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build corerun and coreclr from the same source tree and version.","Never strip exported symbols from libcoreclr when packaging."],"tags":["dotnet","coreclr","corerun","native-host","linking"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}