{"record":{"id":"92568b4881b63aa4","repo":"dotnet/BenchmarkDotNet","slug":"method-getrunnerpath-not-found-92568b","errorCode":null,"errorMessage":"Method 'GetRunnerPath' not found.","messagePattern":"Method 'GetRunnerPath' not found\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/BenchmarkDotNet.Diagnostics.dotTrace/DotTraceDiagnoser.cs","lineNumber":64,"sourceCode":"    protected override string CreateSnapshotFilePath(DiagnoserActionParameters parameters)\n    {\n        return ArtifactFileNameHelper.GetFilePath(parameters, \"snapshots\", DateTime.Now, \"dtp\", \".0000\".Length);\n    }\n\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:","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/dotnet/BenchmarkDotNet/blob/b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3/src/BenchmarkDotNet.Diagnostics.dotTrace/DotTraceDiagnoser.cs#L46-L82","documentation":"GetRunnerPath located the DotTrace ConsoleRunnerPackage instance but its runtime type exposes no 'GetRunnerPath' method. The SelfApi package type was refactored so the method was renamed, re-signatured, or moved off this type.","triggerScenarios":"A JetBrains.Profiler.SelfApi version where the runner-package type no longer has a parameterless GetRunnerPath() method. One reflection step past the missing-field case.","commonSituations":"SelfApi upgraded out of sync with BDN; cached prerequisite from a different build; insider profiler build.","solutions":["Restore the JetBrains.Profiler.SelfApi version declared by your BenchmarkDotNet build.","Clear the prerequisite cache and let InitAsync re-download the matching package.","Upgrade BenchmarkDotNet to a release compatible with your SelfApi layout."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { /* use dotTrace diagnoser */ }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Method 'GetRunnerPath' not found\"))\n{\n    log.Error(\"dotTrace SelfApi method renamed/moved; align SelfApi version with BDN.\");\n}","preventionTips":["Pin the JetBrains.Profiler.SelfApi version referenced by your BDN build.","Clear the prerequisite cache after upgrades.","Upgrade BDN to a release matching your SelfApi layout."],"tags":["benchmarkdotnet","dottrace","jetbrains","reflection","version-mismatch","profiler"],"backgroundTag":null,"analyzedSha":"b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3","analyzedAt":"2026-08-13T19:12:24.196Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}