{"record":{"id":"0b2b48310ed7b19d","repo":"dotnet/BenchmarkDotNet","slug":"unable-to-invoke-getrunnerpath-0b2b48","errorCode":null,"errorMessage":"Unable to invoke 'GetRunnerPath'.","messagePattern":"Unable to invoke 'GetRunnerPath'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/BenchmarkDotNet.Diagnostics.dotTrace/DotTraceDiagnoser.cs","lineNumber":68,"sourceCode":"\n    protected override string GetRunnerPath()\n    {\n        var consoleRunnerPackageField = typeof(DotTrace).GetField(\"ConsoleRunnerPackage\", BindingFlags.NonPublic | BindingFlags.Static);\n        if (consoleRunnerPackageField == null)\n            throw new InvalidOperationException(\"Field 'ConsoleRunnerPackage' not found.\");\n\n        object? consoleRunnerPackage = consoleRunnerPackageField.GetValue(null);\n        if (consoleRunnerPackage == null)\n            throw new InvalidOperationException(\"Unable to get value of 'ConsoleRunnerPackage'.\");\n\n        var consoleRunnerPackageType = consoleRunnerPackage.GetType();\n        var getRunnerPathMethod = consoleRunnerPackageType.GetMethod(\"GetRunnerPath\");\n        if (getRunnerPathMethod == null)\n            throw new InvalidOperationException(\"Method 'GetRunnerPath' not found.\");\n\n        string? runnerPath = getRunnerPathMethod.Invoke(consoleRunnerPackage, null) as string;\n        if (runnerPath == null)\n            throw new InvalidOperationException(\"Unable to invoke 'GetRunnerPath'.\");\n\n        return runnerPath;\n    }\n\n    internal override bool IsSupported(RuntimeMoniker runtimeMoniker)\n    {\n        switch (runtimeMoniker)\n        {\n            case RuntimeMoniker.HostProcess:\n            case RuntimeMoniker.Net461:\n            case RuntimeMoniker.Net462:\n            case RuntimeMoniker.Net47:\n            case RuntimeMoniker.Net471:\n            case RuntimeMoniker.Net472:\n            case RuntimeMoniker.Net48:\n            case RuntimeMoniker.Net481:\n            case RuntimeMoniker.Net50:\n            case RuntimeMoniker.Net60:","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/dotnet/BenchmarkDotNet/blob/b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3/src/BenchmarkDotNet.Diagnostics.dotTrace/DotTraceDiagnoser.cs#L50-L86","documentation":"GetRunnerPath's final guard for dotTrace: GetRunnerPath was found and invoked but returned null / not castable to string. The method exists but produced no usable runner path, usually because the prerequisite runner binary was never extracted.","triggerScenarios":"InitAsync downloaded the prerequisite but the runner executable was not extracted to the expected location, so GetRunnerPath returns null; or the invocation failed internally and SelfApi swallowed it into a null return.","commonSituations":"Corrupted/interrupted prerequisite download or extraction; antivirus quarantining the runner exe; insufficient disk space/permissions; leftover partial state from a prior failed run.","solutions":["Delete the cached prerequisite directory and re-run InitAsync to re-download and extract cleanly.","Verify disk space and write permissions for the cache path.","Check/reconfigure antivirus that may quarantine the JetBrains runner.","Align the SelfApi version with your BDN build."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { /* use dotTrace diagnoser */ }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Unable to invoke 'GetRunnerPath'\"))\n{\n    log.Error(\"dotTrace runner not extracted; check disk/AV/cache and re-run InitAsync.\");\n}","preventionTips":["Clear the prerequisite cache so InitAsync re-extracts the runner cleanly.","Ensure disk space and write permissions for the cache path.","Check antivirus quarantine rules for the JetBrains runner exe."],"tags":["benchmarkdotnet","dottrace","jetbrains","reflection","profiler","init"],"backgroundTag":null,"analyzedSha":"b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3","analyzedAt":"2026-08-13T19:12:24.196Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}