{"record":{"id":"06d845211c5cce68","repo":"dotnet/reactive","slug":"plugin-host-executable-not-found-at-pluginhostexecutablepath","errorCode":null,"errorMessage":"PlugIn host executable not found at {plugInHostExecutablePath}","messagePattern":"PlugIn host executable not found at (.+?)","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn.HostDriver/PlugInHost.cs","lineNumber":117,"sourceCode":"            launcher);\n        if (!Directory.Exists(plugInHostProjectFolder))\n        {\n            throw new DirectoryNotFoundException($\"PlugIn host project folder not found at {plugInHostProjectFolder}\");\n        }\n        var plugInHostExecutableFolder = Path.Combine(\n            plugInHostProjectFolder,\n            $\"bin/{Configuration}/{hostRuntimeTfm}/\");\n        if (!Directory.Exists(plugInHostExecutableFolder))\n        {\n            throw new DirectoryNotFoundException($\"PlugIn host build output folder not found at {plugInHostExecutableFolder}\");\n        }\n\n        var plugInHostExecutablePath = Path.Combine(\n            plugInHostExecutableFolder,\n            $\"{launcher}.exe\");\n        if (!File.Exists(plugInHostExecutablePath))\n        {\n            throw new FileNotFoundException($\"PlugIn host executable not found at {plugInHostExecutablePath}\");\n        }\n\n        var firstPlugInPath = await _plugInBuilder.GetPlugInDllPathAsync(firstPlugIn);\n        var secondPlugInPath = await _plugInBuilder.GetPlugInDllPathAsync(secondPlugIn);\n\n        var startInfo = new ProcessStartInfo\n        {\n            FileName = plugInHostExecutablePath,\n            RedirectStandardOutput = true,\n            UseShellExecute = false,\n            //CreateNoWindow = true,\n            Arguments = $\"{firstPlugInPath} {secondPlugInPath}\",\n            WorkingDirectory = plugInHostExecutableFolder,\n        };\n\n        using var process = new Process { StartInfo = startInfo };\n        process.Start();\n","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn.HostDriver/PlugInHost.cs#L99-L135","documentation":"The Gauntlet PlugIn host driver launches a child process (PlugIn.Host.<launcher>.exe) to run plug-in checks. Before launching, it checks that the host executable exists in the expected folder and throws FileNotFoundException when the built host binary is missing. This indicates the plug-in host project was not built or was built to a different configuration/folder than expected.","triggerScenarios":"PlugInHost.Run is called but File.Exists on Path.Combine(plugInHostExecutableFolder, launcher + '.exe') returns false — the host .exe was never built, was cleaned, or the launcher name/folder is wrong.","commonSituations":"Running Gauntlet checks without a prior build of PlugIn.Host; switching Debug/Release configurations so the exe lands elsewhere; a clean/restore step deleting the output; renaming the launcher project or target framework so the path changes.","solutions":["Build the plug-in host project (dotnet build on the Gauntlet/PlugIn.Host solution or project) before running the check","Verify plugInHostExecutableFolder and the launcher name match the actual output path (bin/<Config>/<TFM>/<launcher>.exe)","Ensure you run with the same configuration the Gauntlet expects (usually Release)","Check that antivirus/cleanup scripts are not deleting the bin output"],"exampleFix":"// before: running the check directly without building\nawait plugInHost.Run(...);\n// after: ensure the host is built first\ndotnet build Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn.HostDriver -c Release\nawait plugInHost.Run(...);","handlingStrategy":"validation","validationCode":"string exePath = Path.Combine(hostFolder, launcher + \".exe\");\nif (!File.Exists(exePath))\n    throw new InvalidOperationException($\"Build PlugIn.Host first; missing {exePath}\");","typeGuard":"bool HostExists(string folder, string launcher) => File.Exists(Path.Combine(folder, launcher + \".exe\"));","tryCatchPattern":"try\n{\n    await plugInHost.Run(...);\n}\ncatch (FileNotFoundException ex) when (ex.Message.Contains(\"PlugIn host executable\"))\n{\n    // rebuild host projects, then retry once\n}","preventionTips":["Always build the Gauntlet plug-in host projects before running checks","Run in the configuration (Release) the harness expects","Avoid cleanup scripts that delete bin output while checks run","Assert the host path exists at test-suite startup with a clear message"],"tags":["file-not-found","build","process-launch","test-harness"],"backgroundTag":"file-not-found","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}