{"record":{"id":"208f9036a6b9e3b8","repo":"dotnet/BenchmarkDotNet","slug":"provided-corerun-path-does-not-exist-please-remem","errorCode":null,"errorMessage":"Provided CoreRun path does not exist. Please remember that BDN expects path to CoreRun.exe (corerun on Unix), not to Core_Root folder.","messagePattern":"Provided CoreRun path does not exist\\. Please remember that BDN expects path to CoreRun\\.exe \\(corerun on Unix\\), not to Core_Root folder\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"src/BenchmarkDotNet/Toolchains/CoreRun/CoreRunToolchain.cs","lineNumber":26,"sourceCode":"    public class CoreRunToolchain : IToolchain\n    {\n        /// <summary>\n        /// creates a CoreRunToolchain which is using provided CoreRun to execute .NET Core apps\n        /// </summary>\n        /// <param name=\"coreRun\">the path to CoreRun</param>\n        /// /<param name=\"createCopy\">should a copy of CoreRun be performed? True by default. <remarks>The toolchain replaces old dependencies in CoreRun folder with newer versions if used by the benchmarks.</remarks></param>\n        /// <param name=\"targetFrameworkMoniker\">TFM, net10.0 is the default</param>\n        /// <param name=\"customDotNetCliPath\">path to dotnet cli, if not provided the one from PATH will be used</param>\n        /// <param name=\"displayName\">display name, CoreRun is the default value</param>\n        /// <param name=\"restorePath\">the directory to restore packages to</param>\n        public CoreRunToolchain(FileInfo coreRun, bool createCopy = true,\n            string targetFrameworkMoniker = \"net10.0\",\n            FileInfo? customDotNetCliPath = null,\n            DirectoryInfo? restorePath = null,\n            string displayName = \"CoreRun\")\n        {\n            if (!coreRun.Exists)\n                throw new FileNotFoundException(\"Provided CoreRun path does not exist. Please remember that BDN expects path to CoreRun.exe (corerun on Unix), not to Core_Root folder.\");\n\n            SourceCoreRun = coreRun;\n            CopyCoreRun = createCopy ? GetShadowCopyPath(coreRun) : coreRun;\n            CustomDotNetCliPath = customDotNetCliPath;\n            RestorePath = restorePath;\n\n            Name = displayName;\n            Generator = new CoreRunGenerator(SourceCoreRun, CopyCoreRun, targetFrameworkMoniker, customDotNetCliPath?.FullName ?? \"\", restorePath?.FullName ?? \"\");\n            Builder = new CoreRunPublisher(targetFrameworkMoniker, CopyCoreRun, customDotNetCliPath);\n            Executor = new DotNetCliExecutor(customDotNetCliPath: CopyCoreRun.FullName); // instead of executing \"dotnet $pathToDll\" we do \"CoreRun $pathToDll\"\n        }\n\n        public string Name { get; }\n\n        public IGenerator Generator { get; }\n\n        public IBuilder Builder { get; }\n","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/dotnet/BenchmarkDotNet/blob/b515068b61ad1c9c9aa938b8ece4af1e7d6d85a3/src/BenchmarkDotNet/Toolchains/CoreRun/CoreRunToolchain.cs#L8-L44","documentation":"CoreRunToolchain validates the provided CoreRun FileInfo at construction; the file must exist and must be the executable itself, not the Core_Root folder that contains it.","triggerScenarios":"Thrown at src/BenchmarkDotNet/Toolchains/CoreRun/CoreRunToolchain.cs:26 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the full path to the CoreRun executable (CoreRun.exe on Windows, corerun on Unix), not the Core_Root directory.","Verify the file exists at the path you configured, e.g. with Test-Path or ls.","Build or download CoreRun for your runtime repo checkout and point CoreRunToolchain at that artifact."],"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"}