{"record":{"id":"6d7697f98c22cfbb","repo":"microsoft/semantic-kernel","slug":"type-stepinfo-innerstepdotnettype-is-not-a-val","errorCode":null,"errorMessage":"Type '{stepInfo.InnerStepDotnetType}' is not a valid KernelProcessStep type.","messagePattern":"Type '(.+?)' is not a valid KernelProcessStep type\\.","errorType":"exception","errorClass":"KernelException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Experimental/Process.Runtime.Dapr/Actors/StepActor.cs","lineNumber":107,"sourceCode":"    /// Initializes the step with the provided step information.\n    /// </summary>\n    /// <param name=\"stepInfo\">The <see cref=\"KernelProcessStepInfo\"/> instance describing the step.</param>\n    /// <param name=\"parentProcessId\">The Id of the parent process if one exists.</param>\n    /// <param name=\"eventProxyStepId\">An optional identifier of an actor requesting to proxy events.</param>\n    private void InitializeStep(DaprStepInfo stepInfo, string? parentProcessId, string? eventProxyStepId = null)\n    {\n        Verify.NotNull(stepInfo, nameof(stepInfo));\n\n        // Attempt to load the inner step type\n        this._innerStepType = Type.GetType(stepInfo.InnerStepDotnetType);\n        if (this._innerStepType is null)\n        {\n            throw new KernelException($\"Could not load the inner step type '{stepInfo.InnerStepDotnetType}'.\").Log(this._logger);\n        }\n\n        if (!typeof(KernelProcessStep).IsAssignableFrom(this._innerStepType))\n        {\n            throw new KernelException($\"Type '{stepInfo.InnerStepDotnetType}' is not a valid KernelProcessStep type.\").Log(this._logger);\n        }\n\n        this.ParentProcessId = parentProcessId;\n        this._stepInfo = stepInfo;\n        this._stepState = this._stepInfo.State;\n        this._logger = this._kernel.LoggerFactory?.CreateLogger(this._innerStepType) ?? new NullLogger<StepActor>();\n        this._outputEdges = this._stepInfo.Edges.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToList());\n        this._eventNamespace = $\"{this._stepInfo.State.Name}_{this._stepInfo.State.Id}\";\n\n        if (!string.IsNullOrWhiteSpace(eventProxyStepId))\n        {\n            this.EventProxyStepId = new ActorId(eventProxyStepId);\n        }\n\n        this._isInitialized = true;\n    }\n\n    /// <summary>","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Experimental/Process.Runtime.Dapr/Actors/StepActor.cs#L89-L125","documentation":"After successfully loading the inner step type via Type.GetType, InitializeStep validates that it inherits from KernelProcessStep. If it does not, this KernelException is thrown. The Dapr runtime can only execute steps that derive from the Semantic Kernel process step base class.","triggerScenarios":"InnerStepDotnetType resolves to a valid CLR type, but that type is not a subclass of KernelProcessStep. This happens when a non-step type name was accidentally stored in InnerStepDotnetType, or the step class was refactored to no longer inherit from KernelProcessStep.","commonSituations":"A process graph was serialized with a type name that does not derive from KernelProcessStep (e.g. a plain POCO or a data model class). A step class had its base class removed during refactoring. A custom DaprStepInfo was constructed with an incorrect InnerStepDotnetType value.","solutions":["Ensure the type referenced by InnerStepDotnetType inherits from KernelProcessStep or KernelProcessStep<TState>.","If the step class was refactored, restore the KernelProcessStep inheritance or rebuild and re-serialize the process graph.","Audit the process builder code to confirm that only KernelProcessStep-derived types are registered as steps."],"exampleFix":"// before — step class missing base\npublic class MyStep { ... }\n\n// after\npublic class MyStep : KernelProcessStep { ... }","handlingStrategy":"validation","validationCode":"Type? stepType = Type.GetType(stepInfo.InnerStepDotnetType);\nif (stepType is null || !typeof(KernelProcessStep).IsAssignableFrom(stepType))\n{\n    throw new InvalidOperationException($\"Type '{stepInfo.InnerStepDotnetType}' must inherit from KernelProcessStep.\");\n}","typeGuard":"static bool IsValidStepType(string assemblyQualifiedName)\n{\n    var t = Type.GetType(assemblyQualifiedName);\n    return t is not null && typeof(KernelProcessStep).IsAssignableFrom(t);\n}","tryCatchPattern":"try\n{\n    await stepActor.InitializeStepAsync(stepInfo, parentProcessId);\n}\ncatch (KernelException ex) when (ex.Message.Contains(\"not a valid KernelProcessStep type\"))\n{\n    logger.LogError(\"Type '{Type}' does not inherit from KernelProcessStep.\", stepInfo.InnerStepDotnetType);\n}","preventionTips":["Ensure all step classes inherit from KernelProcessStep or KernelProcessStep<TState>.","Do not store non-step type names in DaprStepInfo.InnerStepDotnetType.","Run a validation pass on the process graph before deployment."],"tags":["dapr","process-runtime","type-validation","semantic-kernel"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}