dotnet/runtime · error
%s
Error message
%s
What it means
log_error_info() at src/coreclr/hosts/corerun/corerun.cpp:253 is the error-writer callback registered with CoreCLR via coreclr_set_error_writer (line 596). CoreCLR invokes it with diagnostic strings (assembly-load failures, binding errors, runtime errors) and corerun writes them verbatim to stderr. Any CoreCLR-reported error surfaces through this line.
Source
Thrown at src/coreclr/hosts/corerun/corerun.cpp:253
}
std::fprintf(fd, "Managed assembly: %s\n", _managedAssembly);
std::fprintf(fd, "Arguments (%d): ", _argc);
for (int i = 0; i < _argc; ++i)
{
std::fprintf(fd, "%s ", _argv[i]);
}
std::fprintf(fd, "\n");
}
};
// The current CoreCLR instance details.
static void* CurrentClrInstance;
static unsigned int CurrentAppDomainId;
static void log_error_info(const char* line)
{
std::fprintf(stderr, "%s\n", line);
}
size_t HOST_CONTRACT_CALLTYPE get_runtime_property(
const char* key,
char* value_buffer,
size_t value_buffer_size,
void* contract_context)
{
configuration* config = static_cast<configuration *>(contract_context);
if (::strcmp(key, HOST_PROPERTY_ENTRY_ASSEMBLY_NAME) == 0)
{
// Compute the entry assembly name based on the entry assembly full path
pal::string_t dir;
pal::string_t file;
pal::split_path_to_dir_filename(config->entry_assembly_fullpath, dir, file);
file = file.substr(0, file.rfind(W('.')));
View on GitHub (pinned to 60108ba66e)
Solutions
- Read the full error line printed — it names the specific CoreCLR failure.
- Verify the TPA list and APP_PATHS properties point at existing assemblies.
- Ensure System.Private.CoreLib.dll and the BCL assemblies are present in the coreclr directory.
- Rebuild/restore the target framework so all dependencies exist.
Defensive patterns
Strategy: try-catch
Validate before calling
for (auto& p : required_assembly_paths) {
if (!pal::file_exists(p.c_str())) {
pal::fprintf(stderr, W("Missing required assembly: %s\n"), p.c_str());
return EXIT_FAILURE;
}
} Try / catch
int hr = coreclr_initialize_func(exePath, ...);
if (FAILED(hr)) {
fprintf(stderr, "coreclr_initialize failed: hr=0x%08x\n", hr);
return EXIT_FAILURE;
} Prevention
- Validate all assembly paths exist before calling coreclr_initialize.
- Inspect coreclr_initialize/coreclr_execute_assembly return codes, not just the error-writer output.
When it happens
Trigger: CoreCLR emits an error during initialize/execute/shutdown — e.g. a missing dependency assembly, TPA list misconfiguration, trust/casablanca failure, or a surfaced unhandled managed exception.
Common situations: Missing System.Private.CoreLib.dll or other TPA assemblies; wrong TRUSTED_PLATFORM_ASSEMBLIES property; APP_PATHS pointing at nonexistent assemblies; framework version mismatch.
Related errors
AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10).
Data as JSON: /api/errors/ab9b06bdfbfc75b4.
Report an issue: GitHub.