microsoft/semantic-kernel · error · KernelException
Could not load the inner step type '{stepInfo.InnerStepDotne
Error message
Could not load the inner step type '{stepInfo.InnerStepDotnetType}'. What it means
StepActor.InitializeStep calls Type.GetType on stepInfo.InnerStepDotnetType, which holds the assembly-qualified name of the step's .NET type. If Type.GetType cannot resolve the type (returns null), this KernelException is thrown. The InnerStepDotnetType is originally set from KernelStepInfo.InnerType.AssemblyQualifiedName when the DaprStepInfo is created.
Source
Thrown at dotnet/src/Experimental/Process.Runtime.Dapr/Actors/StepActor.cs:102
}
await this.StateManager.SaveStateAsync().ConfigureAwait(false);
}
/// <summary>
/// Initializes the step with the provided step information.
/// </summary>
/// <param name="stepInfo">The <see cref="KernelProcessStepInfo"/> instance describing the step.</param>
/// <param name="parentProcessId">The Id of the parent process if one exists.</param>
/// <param name="eventProxyStepId">An optional identifier of an actor requesting to proxy events.</param>
private void InitializeStep(DaprStepInfo stepInfo, string? parentProcessId, string? eventProxyStepId = null)
{
Verify.NotNull(stepInfo, nameof(stepInfo));
// Attempt to load the inner step type
this._innerStepType = Type.GetType(stepInfo.InnerStepDotnetType);
if (this._innerStepType is null)
{
throw new KernelException($"Could not load the inner step type '{stepInfo.InnerStepDotnetType}'.").Log(this._logger);
}
if (!typeof(KernelProcessStep).IsAssignableFrom(this._innerStepType))
{
throw new KernelException($"Type '{stepInfo.InnerStepDotnetType}' is not a valid KernelProcessStep type.").Log(this._logger);
}
this.ParentProcessId = parentProcessId;
this._stepInfo = stepInfo;
this._stepState = this._stepInfo.State;
this._logger = this._kernel.LoggerFactory?.CreateLogger(this._innerStepType) ?? new NullLogger<StepActor>();
this._outputEdges = this._stepInfo.Edges.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToList());
this._eventNamespace = $"{this._stepInfo.State.Name}_{this._stepInfo.State.Id}";
if (!string.IsNullOrWhiteSpace(eventProxyStepId))
{
this.EventProxyStepId = new ActorId(eventProxyStepId);
}View on GitHub (pinned to c028a0c7dc)
Solutions
- Add a project reference or assembly load to the Dapr actor host so that the assembly containing the step type is available at runtime.
- If the step type was renamed or moved, rebuild and redeploy the process with the updated assembly-qualified name, or clear the persisted Dapr state so it is re-initialized.
- Verify InnerStepDotnetType is a valid assembly-qualified name (include assembly, version, culture, and public key token if signed) using a debugger or logging before initialization.
Defensive patterns
Strategy: validation
Validate before calling
// Before initializing, verify the step type is loadable:
Type? stepType = Type.GetType(stepInfo.InnerStepDotnetType);
if (stepType is null)
{
throw new InvalidOperationException($"Step type '{stepInfo.InnerStepDotnetType}' cannot be resolved. Ensure the assembly is loaded.");
}
await stepActor.InitializeStepAsync(stepInfo, parentProcessId); Type guard
static bool IsStepTypeLoadable(string assemblyQualifiedName)
{
return Type.GetType(assemblyQualifiedName) is not null;
} Try / catch
try
{
await stepActor.InitializeStepAsync(stepInfo, parentProcessId);
}
catch (KernelException ex) when (ex.Message.Contains("Could not load the inner step type"))
{
logger.LogError("Step type '{Type}' not found. Add the assembly reference to the actor host project.", stepInfo.InnerStepDotnetType);
} Prevention
- Ensure the assembly containing step classes is referenced by the Dapr actor host project.
- Use assembly-qualified type names consistently — avoid manual string construction.
- After renaming or moving a step class, rebuild and redeploy the process graph.
When it happens
Trigger: Type.GetType fails to resolve the assembly-qualified type name. This happens when the assembly containing the step class is not loaded in the actor host process, the type was renamed/moved, or the assembly-qualified name is stale or malformed.
Common situations: The step class lives in a separate assembly that is not referenced by the Dapr actor host project. The step class was renamed or moved to a different namespace between when the process was built/persisted and when it runs. A version mismatch where the assembly-qualified name includes a public key token or version that no longer matches.
Related errors
- Type '{stepStateType.Value}' could not be resolved to a vali
- Unable to create inner step type from assembly qualified nam
- Could not load type '{assemblyQualifiedTypeName}'.
- The Process must be initialized before accessing the Name pr
- Internal Process Error: The target event id must be specifie
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/a06a9a7f4237cd4d.
Report an issue: GitHub.