{"record":{"id":"29869fad3f03ea52","repo":"dotnet/BenchmarkDotNet","slug":"runtime-runtimeid-is-not-supported","errorCode":null,"errorMessage":"Runtime {runtimeId} is not supported","messagePattern":"Runtime (.+?) is not supported","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs","lineNumber":700,"sourceCode":"                    return MakeMonoJob(baseJob, options, MonoRuntime.Mono80);\n\n                case RuntimeMoniker.Mono90:\n                    return MakeMonoJob(baseJob, options, MonoRuntime.Mono90);\n\n                case RuntimeMoniker.Mono10_0:\n                    return MakeMonoJob(baseJob, options, MonoRuntime.Mono10_0);\n\n                case RuntimeMoniker.Mono11_0:\n                    return MakeMonoJob(baseJob, options, MonoRuntime.Mono11_0);\n\n                case RuntimeMoniker.R2R80:\n                case RuntimeMoniker.R2R90:\n                case RuntimeMoniker.R2R10_0:\n                case RuntimeMoniker.R2R11_0:\n                    return CreateR2RJob(baseJob, options, runtimeMoniker.GetRuntime());\n\n                default:\n                    throw new NotSupportedException($\"Runtime {runtimeId} is not supported\");\n            }\n        }\n\n        private static Job CreateAotJob(Job baseJob, CommandLineOptions options, RuntimeMoniker runtimeMoniker, string ilCompilerVersion, string nuGetFeedUrl = \"\")\n        {\n            var builder = NativeAotToolchain.CreateBuilder();\n\n            if (options.CliPath != null)\n                builder.DotNetCli(options.CliPath.FullName);\n            if (options.RestorePath != null)\n                builder.PackagesRestorePath(options.RestorePath.FullName);\n\n            if (options.IlcPackages != null)\n                builder.UseLocalBuild(options.IlcPackages);\n            else if (options.ILCompilerVersion.IsNotBlank())\n                builder.UseNuGet(options.ILCompilerVersion, nuGetFeedUrl);\n            else\n                builder.UseNuGet(ilCompilerVersion, nuGetFeedUrl);","sourceCodeStart":682,"sourceCodeEnd":718,"githubUrl":"https://github.com/dotnet/BenchmarkDotNet/blob/b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3/src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs#L682-L718","documentation":"While parsing the `--runtimes` CLI option, ConfigParser switches over a RuntimeMoniker to build the appropriate Job (Core/Mono/NetFramework/NativeAOT/ReadyToRun). The default arm throws NotSupportedException for any moniker the installed BenchmarkDotNet version does not know how to materialize. runtimeId in the message is the moniker name from the command line.","triggerScenarios":"Passing a `--runtimes` value that maps to a RuntimeMoniker BDN recognizes as an enum member but has no build branch for, or a value from a newer .NET release than this BDN supports (the moniker exists but isn't handled, or parses to NotRecognized/HostProcess that falls through).","commonSituations":"Running an older BenchmarkDotNet against a brand-new .NET TFM, a typo in the runtime name that still parses, or a custom RuntimeMoniker extension without a matching ConfigParser case.","solutions":["Upgrade BenchmarkDotNet to a release that knows the target runtime moniker.","Use a supported `--runtimes` token matching the installed BDN version (check the enum values and docs).","If you only need the host runtime, omit `--runtimes` (defaults to HostProcess).","For custom runtimes, configure the Job programmatically (Job.Default.WithRuntime(...)) instead of via CLI."],"exampleFix":"# before\ndotnet run -c Release --runtimes net10.0   # moniker not handled by this BDN\n\n# after\ndotnet run -c Release --runtimes net9.0    # supported by current BDN\n# or upgrade the BenchmarkDotNet package reference","handlingStrategy":"validation","validationCode":"if (!Enum.TryParse<RuntimeMoniker>(monikerName, ignoreCase: true, out var moniker)\n    || !IsHandledMoniker(moniker))\n    throw new ArgumentException($\"Runtime '{monikerName}' is not supported by this BenchmarkDotNet version.\");\n// then pass it to the runner","typeGuard":"static bool IsHandledMoniker(RuntimeMoniker m)\n    => m is RuntimeMoniker.NetCoreApp31 or RuntimeMoniker.Net50 or RuntimeMoniker.Net60\n       or RuntimeMoniker.Net70 or RuntimeMoniker.Net80 or RuntimeMoniker.Net90\n       or RuntimeMoniker.Net48 or RuntimeMoniker.Mono /* ...handled set... */;","tryCatchPattern":"try { BenchmarkRunner.Run(benchmarks); }\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"Runtime\") && ex.Message.Contains(\"not supported\"))\n{\n    // drop the unsupported moniker from --runtimes or upgrade BenchmarkDotNet\n}","preventionTips":["Keep BenchmarkDotNet updated to a version that supports your target runtimes.","Cross-check `--runtimes` tokens against the RuntimeMoniker enum your BDN version handles.","Prefer programmatic Job.WithRuntime(...) over CLI tokens for custom runtimes."],"tags":["cli","config-parser","runtime-moniker","notsupported"],"backgroundTag":null,"analyzedSha":"b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3","analyzedAt":"2026-08-13T19:12:24.196Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}