{"record":{"id":"09137ba81828cba9","repo":"dotnet/BenchmarkDotNet","slug":"unable-to-invoke-getrunnerpath","errorCode":null,"errorMessage":"Unable to invoke 'GetRunnerPath'.","messagePattern":"Unable to invoke 'GetRunnerPath'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs","lineNumber":65,"sourceCode":"\n    protected override string GetRunnerPath()\n    {\n        var consoleRunnerPackageField = typeof(DotMemory).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":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/dotnet/BenchmarkDotNet/blob/b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs#L47-L83","documentation":"GetRunnerPath's final guard: GetRunnerPath was found and invoked but returned null (or could not be cast to string). The method exists but did not yield a usable runner path, typically because the prerequisite package never fully extracted its runner binary.","triggerScenarios":"InitAsync downloaded the prerequisite but the runner executable was not extracted / not placed where GetRunnerPath expects, so the method returns null. Can also occur if invocation itself throws and the SelfApi catches and returns null internally.","commonSituations":"Corrupted or interrupted prerequisite download/extraction; antivirus quarantining the runner exe; insufficient disk space or permissions to write the runner; partial state left from a previously failed run.","solutions":["Clear the cached prerequisite directory and re-run so InitAsync re-downloads and extracts cleanly.","Check disk space and write permissions for the cache directory.","Disable/reconfigure antivirus that may quarantine the JetBrains runner executable.","Match the SelfApi version to your BenchmarkDotNet build."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { /* use dotMemory diagnoser */ }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Unable to invoke 'GetRunnerPath'\"))\n{\n    log.Error(\"dotMemory 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 directory.","Check antivirus quarantine rules for the JetBrains runner exe."],"tags":["benchmarkdotnet","dotmemory","jetbrains","reflection","profiler","init"],"backgroundTag":null,"analyzedSha":"b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3","analyzedAt":"2026-08-13T19:12:24.196Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}