dotnet/reactive · error · FileNotFoundException

PlugIn host executable not found at

Error message

PlugIn host executable not found at {plugInHostExecutablePath}

What it means

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.

Solutions

  1. Build the plug-in host project (dotnet build on the Gauntlet/PlugIn.Host solution or project) before running the check
  2. Verify plugInHostExecutableFolder and the launcher name match the actual output path (bin/<Config>/<TFM>/<launcher>.exe)
  3. Ensure you run with the same configuration the Gauntlet expects (usually Release)
  4. Check that antivirus/cleanup scripts are not deleting the bin output

Example fix

// before: running the check directly without building
await plugInHost.Run(...);
// after: ensure the host is built first
dotnet build Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn.HostDriver -c Release
await plugInHost.Run(...);
Defensive patterns

Strategy: validation

Validate before calling

string exePath = Path.Combine(hostFolder, launcher + ".exe");
if (!File.Exists(exePath))
    throw new InvalidOperationException($"Build PlugIn.Host first; missing {exePath}");

Type guard

bool HostExists(string folder, string launcher) => File.Exists(Path.Combine(folder, launcher + ".exe"));

Try / catch

try
{
    await plugInHost.Run(...);
}
catch (FileNotFoundException ex) when (ex.Message.Contains("PlugIn host executable"))
{
    // rebuild host projects, then retry once
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of dotnet/reactive@94b5d5ab91 (2026-09-15). Data as JSON: /api/errors/06d845211c5cce68. Report an issue: GitHub.

Appendix: source

Thrown at Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn.HostDriver/PlugInHost.cs:117

            launcher);
        if (!Directory.Exists(plugInHostProjectFolder))
        {
            throw new DirectoryNotFoundException($"PlugIn host project folder not found at {plugInHostProjectFolder}");
        }
        var plugInHostExecutableFolder = Path.Combine(
            plugInHostProjectFolder,
            $"bin/{Configuration}/{hostRuntimeTfm}/");
        if (!Directory.Exists(plugInHostExecutableFolder))
        {
            throw new DirectoryNotFoundException($"PlugIn host build output folder not found at {plugInHostExecutableFolder}");
        }

        var plugInHostExecutablePath = Path.Combine(
            plugInHostExecutableFolder,
            $"{launcher}.exe");
        if (!File.Exists(plugInHostExecutablePath))
        {
            throw new FileNotFoundException($"PlugIn host executable not found at {plugInHostExecutablePath}");
        }

        var firstPlugInPath = await _plugInBuilder.GetPlugInDllPathAsync(firstPlugIn);
        var secondPlugInPath = await _plugInBuilder.GetPlugInDllPathAsync(secondPlugIn);

        var startInfo = new ProcessStartInfo
        {
            FileName = plugInHostExecutablePath,
            RedirectStandardOutput = true,
            UseShellExecute = false,
            //CreateNoWindow = true,
            Arguments = $"{firstPlugInPath} {secondPlugInPath}",
            WorkingDirectory = plugInHostExecutableFolder,
        };

        using var process = new Process { StartInfo = startInfo };
        process.Start();

View on GitHub (pinned to 94b5d5ab91)