{"record":{"id":"fbe21300ca5e9274","repo":"microsoft/semantic-kernel","slug":"no-targets-found-for-the-specified-function-and-pa","errorCode":null,"errorMessage":"No targets found for the specified function and parameter '{functionName}.{parameterName}'.","messagePattern":"No targets found for the specified function and parameter '(.+?)\\.(.+?)'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Experimental/Process.Core/ProcessBuilder.cs","lineNumber":98,"sourceCode":"    {\n        // Try to resolve the function target on each of the registered entry points.\n        var targets = new List<KernelProcessFunctionTarget>();\n        foreach (var step in this._entrySteps)\n        {\n            try\n            {\n                targets.Add(step.ResolveFunctionTarget(functionName, parameterName));\n            }\n            catch (KernelException)\n            {\n                // If the function is not found on the source step, then we can ignore it.\n            }\n        }\n\n        // If no targets were found or if multiple targets were found, throw an exception.\n        if (targets.Count == 0)\n        {\n            throw new InvalidOperationException($\"No targets found for the specified function and parameter '{functionName}.{parameterName}'.\");\n        }\n        else if (targets.Count > 1)\n        {\n            throw new InvalidOperationException($\"Multiple targets found for the specified function and parameter '{functionName}.{parameterName}'.\");\n        }\n\n        return targets[0];\n    }\n\n    /// <inheritdoc/>\n    internal override void LinkTo(string eventId, ProcessStepEdgeBuilder edgeBuilder)\n    {\n        Verify.NotNull(edgeBuilder?.Source, nameof(edgeBuilder.Source));\n        Verify.NotNull(edgeBuilder?.Target, nameof(edgeBuilder.Target));\n\n        // Keep track of the entry point steps\n        this._entrySteps.Add(edgeBuilder.Source);\n        this._externalEventTargetMap[eventId] = edgeBuilder.Target;","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Experimental/Process.Core/ProcessBuilder.cs#L80-L116","documentation":"Thrown by ProcessBuilder.ResolveFunctionTarget when none of the registered entry-point steps can resolve the requested functionName.parameterName combination. The method tries each entry step and collects KernelExceptions silently, then throws InvalidOperationException if zero targets matched.","triggerScenarios":"Calling ResolveFunctionTarget with a functionName or parameterName that does not exist on any entry-point step in the process. This occurs when linking edges to a process (as a sub-process step) using incorrect or misspelled function/parameter names, or when the target step has no KernelFunction with that signature.","commonSituations":"Using a sub-process as a step and referencing a function/parameter name that doesn't match any [KernelFunction] on the entry steps. Misspelling a function name in an edge definition. Referencing a function on a step that hasn't been registered as an entry point. Passing null for both functionName and parameterName when the entry steps have multiple functions or parameters (ambiguous inference fails).","solutions":["Verify that the functionName exists as a [KernelFunction] on at least one entry-point step in the process.","Verify that the parameterName matches a parameter on that function, or omit it if the function has exactly one parameter.","Ensure the target step is registered as an entry point (linked via OnInputEvent or as a source step that feeds into the process).","If using auto-inference (null names), make sure exactly one function/parameter exists on the entry step."],"exampleFix":"// before — misspelled function name\nstep.SendEventTo(process.WhereInputEventIs(\"StartProces\")); // typo — throws\n\n// after\nstep.SendEventTo(process.WhereInputEventIs(\"StartProcess\"));","handlingStrategy":"validation","validationCode":"// Before resolving, verify the function exists on at least one entry step.\npublic bool FunctionExists(ProcessBuilder process, string? functionName, string? parameterName)\n{\n    foreach (var step in process.Steps)\n    {\n        try\n        {\n            step.ResolveFunctionTarget(functionName, parameterName);\n            return true;\n        }\n        catch { /* not found on this step */ }\n    }\n    return false;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Double-check function and parameter names against [KernelFunction] definitions.","Ensure target steps are registered as entry points via OnInputEvent.","When using auto-inference (null names), ensure the entry step has exactly one function."],"tags":["semantic-kernel","process-framework","function-target","edge","validation"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}