{"record":{"id":"d973d62c470b54f0","repo":"dotnet/runtime","slug":"end-coreclr-execute-assembly-failed-error-0x-0","errorCode":null,"errorMessage":"END: coreclr_execute_assembly failed - Error: 0x%08x\n","messagePattern":"END: coreclr_execute_assembly failed - Error: 0x%08x\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/coreclr/hosts/corerun/corerun.cpp","lineNumber":641,"sourceCode":"        coreclr_set_error_writer_func(nullptr);\n    }\n\n    int exit_code;\n    {\n        actions.before_execute_assembly(config.entry_assembly_fullpath);\n\n        result = coreclr_execute_func(\n            CurrentClrInstance,\n            CurrentAppDomainId,\n            config.entry_assembly_argc,\n            argv_utf8.get(),\n            entry_assembly_utf8.c_str(),\n            (uint32_t*)&exit_code);\n        if (FAILED(result))\n        {\n            pal::fprintf(stderr, W(\"BEGIN: coreclr_execute_assembly failed - Error: 0x%08x\\n\"), result);\n            logger.dump_details();\n            pal::fprintf(stderr, W(\"END: coreclr_execute_assembly failed - Error: 0x%08x\\n\"), result);\n            return -1;\n        }\n\n        actions.after_execute_assembly();\n    }\n\n#ifdef TARGET_BROWSER\n    // in NodeJS/Browser this is not really end of the process, JS keeps running.\n    // We want to keep the CoreCLR runtime alive to be able to process async work\n    // The NodeJS process is kept alive by pending async work via safeSetTimeout() -> runtimeKeepalivePush()\n    // The actual exit code would be set by SystemJS_ResolveMainPromise if the managed Main() is async.\n    // Or in Module.onExit handler when  managed Main() is synchronous.\n    return exit_code;\n#else // TARGET_BROWSER\n    int final_exit_code = corerun_shutdown(exit_code);\n#ifdef TARGET_WASI\n    // wasi:cli/exit's stable exit() only signals ok/err, so wasmtime\n    // collapses any non-zero Main return to host exit 1. When","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/hosts/corerun/corerun.cpp#L623-L659","documentation":"Closing marker (matching BEGIN at 639) that ends the diagnostic block printed after coreclr_execute_assembly() fails. Repeats the HRESULT so log tooling can bracket the dump_details() output between BEGIN and END.","triggerScenarios":"Always emitted immediately after logger.dump_details() following a FAILED coreclr_execute_func() result at line 637-638. Never appears without the preceding BEGIN line.","commonSituations":"Same as error 203; exists for log bracketing of the property/argument dump between BEGIN and END.","solutions":["Pair with BEGIN (203); extract all lines between them as failure context.","Apply the HRESULT-driven diagnosis from error 203.","Feed the captured block to the same parser used for 201/202."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# same bracketing extractor as 201/202\ngrep -A60 'BEGIN: coreclr_execute_assembly failed' run.log | sed '/END: coreclr_execute_assembly failed/q'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat BEGIN (203) and END (204) as a pair when parsing logs.","Capture the full property dump between them.","Feed the block to the same tooling used for initialization failures."],"tags":["coreclr","corerun","runtime-host","logging","hresult"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}