{"record":{"id":"3913759cd370122b","repo":"rtk-ai/rtk","slug":"legacy-dictionary-format-is-unsupported","errorCode":null,"errorMessage":"legacy dictionary format is unsupported","messagePattern":"legacy dictionary format is unsupported","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/cmds/dotnet/binlog.rs","lineNumber":512,"sourceCode":"\n    if (file_format_version < 13 && read_importance) || (flags & FLAG_IMPORTANCE != 0) {\n        let _ = reader.read_7bit_i32()?;\n    }\n\n    Ok(result)\n}\n\nfn skip_build_event_context(reader: &mut BinReader<'_>, file_format_version: i32) -> Result<()> {\n    let count = if file_format_version > 1 { 7 } else { 6 };\n    for _ in 0..count {\n        let _ = reader.read_7bit_i32()?;\n    }\n    Ok(())\n}\n\nfn skip_string_dictionary(reader: &mut BinReader<'_>, file_format_version: i32) -> Result<()> {\n    if file_format_version < 10 {\n        anyhow::bail!(\"legacy dictionary format is unsupported\");\n    }\n\n    let _ = reader.read_7bit_i32()?;\n    Ok(())\n}\n\nfn read_optional_string(\n    reader: &mut BinReader<'_>,\n    parsed: &ParsedBinlog,\n) -> Result<Option<String>> {\n    read_deduplicated_string(reader, parsed)\n}\n\nfn read_deduplicated_string(\n    reader: &mut BinReader<'_>,\n    parsed: &ParsedBinlog,\n) -> Result<Option<String>> {\n    let index = reader.read_7bit_i32()?;","sourceCodeStart":494,"sourceCodeEnd":530,"githubUrl":"https://github.com/rtk-ai/rtk/blob/0924356b4caba4989607227b7c8824d3d8098719/src/cmds/dotnet/binlog.rs#L494-L530","documentation":"skip_string_dictionary, invoked from read_event_fields, refuses to decode the string dictionary when file_format_version < 10. Binlogs before format 10 used a different (legacy) string-record dictionary layout that this parser does not implement; the only supported path reads a 7-bit count for modern formats. Rather than silently skipping garbage, it reports the format limitation explicitly.","triggerScenarios":"read_event_fields encounters the string-dictionary record on a binlog whose header version is between 6 and 9 (MSBuild from roughly VS 2015 / early MSBuild 15 era), making skip_string_dictionary bail immediately.","commonSituations":"Analyzing archived build logs from legacy on-prem build agents; old .NET Framework full-MSBuild logs checked into a repo years ago; replaying old CI artifacts into a modern analysis tool.","solutions":["Regenerate the build log with a modern SDK (`dotnet build -bl`) so the binlog uses format >= 10 (in practice >= 18 for this parser).","Inspect legacy logs with the matching-era MSBuild Structured Log Viewer instead of this parser.","Convert or re-run the equivalent build on an upgraded build agent / container image with a current .NET SDK.","If legacy support is required, implement the pre-10 string-record dictionary layout in skip_string_dictionary."],"exampleFix":"// before\nmsbuild solution.sln /bl:legacy.binlog   # old full-framework MSBuild, format < 10\n// after\ndotnet build solution.sln -bl:modern.binlog   # modern SDK, format >= 18","handlingStrategy":"validation","validationCode":"// refuse legacy binlogs up front (same header check as the parser)\nlet version = read_binlog_format_version(path)?; // gzip-decoded first i32\nif version < 10 {\n    bail!(\"binlog format {} is legacy; regenerate with a modern SDK\", version);\n}","typeGuard":"fn is_modern_binlog(version: i32) -> bool { version >= 10 }","tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"legacy dictionary format\") => {\n        eprintln!(\"legacy MSBuild log detected; rebuild with modern SDK to analyze\");\n        Err(e)\n    }\n    other => other,\n}","preventionTips":["Upgrade legacy build agents/containers to a current .NET SDK before archiving logs","Audit archived .binlog assets: regenerate any produced by pre-2017 MSBuild","Prefer `dotnet build -bl` over full-framework msbuild /bl when logs must be machine-parsed later","Store the producing MSBuild version next to each binlog artifact for early format checks"],"tags":["dotnet","binlog","version-compatibility","msbuild","legacy-format"],"backgroundTag":"unsupported-operation","analyzedSha":"0924356b4caba4989607227b7c8824d3d8098719","analyzedAt":"2026-09-19T19:25:29.612Z","contentChangedAt":"2026-09-19T19:25:29.612Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}