{"record":{"id":"c35da15141493ab4","repo":"dotnet/BenchmarkDotNet","slug":"runtime-runtime","errorCode":null,"errorMessage":"Runtime = \" + runtime","messagePattern":"Runtime = \" \\+ runtime","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/BenchmarkDotNet/Toolchains/Executor.cs","lineNumber":156,"sourceCode":"                case R2RRuntime _:\n                    start.FileName = exePath;\n                    start.Arguments = args;\n                    break;\n                case MonoRuntime mono:\n                    start.FileName = mono.CustomPath.IsNotBlank() ? mono.CustomPath : \"mono\";\n                    start.Arguments = GetMonoArguments(benchmarkCase.Job, exePath, args, resolver);\n                    break;\n                case MonoAotLLVMRuntime _:\n                    start.FileName = exePath;\n                    start.Arguments = args;\n                    start.WorkingDirectory = Path.Combine(artifactsPaths.BinariesDirectoryPath, \"publish\");\n                    break;\n                case CustomRuntime _:\n                    start.FileName = exePath;\n                    start.Arguments = args;\n                    break;\n                default:\n                    throw new NotSupportedException(\"Runtime = \" + runtime);\n            }\n            return start;\n        }\n\n        private static string GetMonoArguments(Job job, string exePath, string args, IResolver resolver)\n        {\n            var arguments = job.HasValue(InfrastructureMode.ArgumentsCharacteristic)\n                ? job.ResolveValue(InfrastructureMode.ArgumentsCharacteristic, resolver)!.OfType<MonoArgument>().ToArray()\n                : [];\n\n            // from mono --help: \"Usage is: mono [options] program [program-options]\"\n            var builder = new StringBuilder(30);\n\n            builder.Append(job.ResolveValue(EnvironmentMode.JitCharacteristic, resolver) == Jit.Llvm ? \"--llvm\" : \"--nollvm\");\n\n            foreach (var argument in arguments)\n            {\n                builder.Append($\" {argument.TextRepresentation}\");","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/dotnet/BenchmarkDotNet/blob/b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3/src/BenchmarkDotNet/Toolchains/Executor.cs#L138-L174","documentation":"Executor builds the ProcessStartInfo per runtime type; an unrecognized runtime falls into the default branch and throws NotSupportedException reporting the runtime value.","triggerScenarios":"Thrown at src/BenchmarkDotNet/Toolchains/Executor.cs:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the supported runtime types: CoreRuntime, ClrRuntime, MonoRuntime, MonoAotLLVMRuntime, or CustomRuntime.","If you introduced a custom Runtime subclass, extend Executor to handle it instead of falling through to the default case.","Upgrade BenchmarkDotNet if the runtime you target was added in a later release."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3","analyzedAt":"2026-08-13T19:12:24.196Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}