{"record":{"id":"fff5b983017394d1","repo":"dotnet/reactive","slug":"unsupported-host-runtime-tfm-hostruntimetfm","errorCode":null,"errorMessage":"Unsupported host runtime TFM: {hostRuntimeTfm}","messagePattern":"Unsupported host runtime TFM: (.+?)","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn.HostDriver/PlugInHost.cs","lineNumber":87,"sourceCode":"    {\n        string launcher;\n\n        if (hostRuntimeTfm.StartsWith(\"net\"))\n        {\n            if (hostRuntimeTfm.Contains('.'))\n            {\n                // .NET Core or .NET 5+\n                launcher = \"PlugIn.HostDotnet\";\n            }\n            else\n            {\n                // .NET Framework\n                launcher = \"PlugIn.HostNetFx\";\n            }\n        }\n        else\n        {\n            throw new ArgumentException($\"Unsupported host runtime TFM: {hostRuntimeTfm}\");\n        }\n\n        DirectoryInfo plugInsFolder = new(\n            Path.Combine(AppContext.BaseDirectory, \"../../../../\"));\n        if (!plugInsFolder.Exists)\n        {\n            throw new DirectoryNotFoundException($\"PlugIns folder not found: {plugInsFolder.FullName}\");\n        }\n\n        var plugInHostProjectFolder = Path.Combine(\n            plugInsFolder.FullName,\n            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,","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn.HostDriver/PlugInHost.cs#L69-L105","documentation":"PlugInHost.Run decides which host executable (PlugIn.HostNetFx, etc.) launches the plug-in based on the host runtime TFM; unrecognized TFMs cause ArgumentException 'Unsupported host runtime TFM'. The set of supported TFMs is fixed in code.","triggerScenarios":"Invoking the Gauntlet plug-in checks with hostRuntimeTfm values like net48, netcoreapp3.1, net5.0 or custom monikers that the switch statement doesn't map to a launcher.","commonSituations":"Adding a new .NET version to the Gauntlet matrix without updating PlugInHost, passing a TFM string with wrong casing or a 'v' prefix, or running checks from a differently-configured build script.","solutions":["Pass a supported TFM (e.g. net45, net46, netcoreapp as wired in the switch)","Update PlugInHost.cs to map the new TFM to the appropriate launcher and rebuild","Normalize/trim the TFM string before calling Run"],"exampleFix":"// before\nawait host.Run(\"net8.0\"); // not mapped\n// after\n// add a case for net8.0 in PlugInHost.Run mapping to the .NET (Core) launcher, or use a supported TFM:\nawait host.Run(\"net6.0\");","handlingStrategy":"validation","validationCode":"var supported = new[] { /* TFMs mapped in PlugInHost.Run */ };\nif (!supported.Contains(hostRuntimeTfm)) throw new ArgumentException($\"Unsupported host runtime TFM: {hostRuntimeTfm}\");","typeGuard":null,"tryCatchPattern":"try { await host.Run(hostRuntimeTfm); }\ncatch (ArgumentException ex) when (ex.Message.StartsWith(\"Unsupported host runtime TFM\")) { /* correct TFM or extend mapping */ }","preventionTips":["Only pass TFMs listed in PlugInHost's switch","Normalize/trim TFM strings from CI inputs","Update PlugInHost when adding new .NET targets to the matrix"],"tags":["rx","test-infrastructure","tfm","gauntlet"],"backgroundTag":"unsupported-enum-value","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}