{"record":{"id":"87d3ef12019ae23f","repo":"dotnet/BenchmarkDotNet","slug":"runtime-moniker-runtimemoniker-is-not-supported","errorCode":null,"errorMessage":"Runtime moniker {runtimeMoniker} is not supported","messagePattern":"Runtime moniker (.+?) is not supported","errorType":"exception","errorClass":"ArgumentOutOfRangeException","httpStatus":null,"severity":"error","filePath":"src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs","lineNumber":127,"sourceCode":"            case RuntimeMoniker.MonoAOTLLVMNet90:\n            case RuntimeMoniker.MonoAOTLLVMNet10_0:\n            case RuntimeMoniker.MonoAOTLLVMNet11_0:\n            case RuntimeMoniker.Mono60:\n            case RuntimeMoniker.Mono70:\n            case RuntimeMoniker.Mono80:\n            case RuntimeMoniker.Mono90:\n            case RuntimeMoniker.Mono10_0:\n            case RuntimeMoniker.Mono11_0:\n                return false;\n            case RuntimeMoniker.NetCoreApp20:\n            case RuntimeMoniker.NetCoreApp21:\n            case RuntimeMoniker.NetCoreApp22:\n                return OsDetector.IsWindows();\n            case RuntimeMoniker.NetCoreApp30:\n            case RuntimeMoniker.NetCoreApp31:\n                return OsDetector.IsWindows() || OsDetector.IsLinux();\n            default:\n                throw new ArgumentOutOfRangeException(nameof(runtimeMoniker), runtimeMoniker, $\"Runtime moniker {runtimeMoniker} is not supported\");\n        }\n    }\n}\n","sourceCodeStart":109,"sourceCodeEnd":131,"githubUrl":"https://github.com/dotnet/BenchmarkDotNet/blob/b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs#L109-L131","documentation":"DotMemoryDiagnoser.IsSupported exhaustively lists every RuntimeMoniker in its switch and throws ArgumentOutOfRangeException on the default branch. The message is a string template ('$\"...{runtimeMoniker}...\") that will not interpolate in an Exception.Message unless formatted, but the intent is: the diagnoser encountered a runtime moniker it has not been updated to recognize.","triggerScenarios":"A new .NET version ships a RuntimeMoniker value that this BDN build's IsSupported switch has not enumerated yet; or a custom/derived RuntimeMoniker. The throw is reached only for genuinely unknown values - all currently known monikers return true or false.","commonSituations":"Running a newer BenchmarkDotNet engine that emits a moniker newer than the dotMemory diagnoser build recognizes; using a preview SDK that maps to a moniker not yet in the switch.","solutions":["Upgrade BenchmarkDotNet.Diagnostics.dotMemory to a version whose IsSupported switch covers your target framework moniker.","If forking/patching, add the missing case returning the desired bool.","Downgrade or change the Job's runtime to a supported moniker."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before assigning a Job runtime, gate on a supported moniker set, or upgrade BDN:\nstatic readonly HashSet<RuntimeMoniker> DotMemorySupported = new()\n{ RuntimeMoniker.Net80, RuntimeMoniker.Net90, RuntimeMoniker.Net60 /* ...per IsSupported */ };\nif (!DotMemorySupported.Contains(job.Runtime.Moniker))\n    throw new NotSupportedException($\"dotMemory diagnoser does not support {job.Runtime.Moniker}; upgrade BDN.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use a BenchmarkDotNet.Diagnostics.dotMemory build whose IsSupported covers your target moniker.","Avoid preview SDKs that map to monikers not yet enumerated.","Add the missing case in IsSupported when patching BDN."],"tags":["benchmarkdotnet","dotmemory","runtime-moniker","compatibility","profiler"],"backgroundTag":null,"analyzedSha":"b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3","analyzedAt":"2026-08-13T19:12:24.196Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}