stride3d/stride · error · InvalidOperationException
The type does not have a public constructor matching the…
Error message
The type {type.Name} does not have a public constructor matching the expected signature: ({string.Join(", ", (IEnumerable<Type>)AssetPropertyNodeGraphConstructorSignature)}) What it means
Error "The type {type.Name} does not have a public constructor matching the expected signature: ({string.Join(", ", (IEnumerable<Type>)AssetPropertyNodeGraphConstructorSignature)})" thrown in stride3d/stride.
Solutions
- Add a public constructor to the graph type with signature (AssetPropertyGraphContainer, AssetItem, ILogger)
- Fix the constructor parameter types so they match exactly
- Regenerate/fix the assembly processor output if the attribute was applied to the wrong type
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at sources/assets/Stride.Core.Assets.Quantum/AssetQuantumRegistry.cs:52 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/7584c3904aa9ebfd.
Report an issue: GitHub.
Appendix: source
Thrown at sources/assets/Stride.Core.Assets.Quantum/AssetQuantumRegistry.cs:52
return;
// Read the precomputed scan index instead of reflecting over every type: the assembly processor
// already buckets the [AssemblyScan] graph attributes, so this skips loading unrelated types (some
// assemblies, e.g. Stride.Assets referencing MSBuild, can't fully load all their types in every host).
var scanTypes = AssemblyRegistry.GetScanTypes(assembly);
if (scanTypes is null)
return;
if (scanTypes.Types.TryGetValue(typeof(AssetPropertyGraphAttribute), out var graphTypes))
{
foreach (var type in graphTypes)
{
var attribute = type.GetCustomAttribute<AssetPropertyGraphAttribute>();
if (attribute is null)
continue;
if (type.GetConstructor(AssetPropertyNodeGraphConstructorSignature) is null)
throw new InvalidOperationException($"The type {type.Name} does not have a public constructor matching the expected signature: ({string.Join(", ", (IEnumerable<Type>)AssetPropertyNodeGraphConstructorSignature)})");
if (!NodeGraphTypes.TryAdd(attribute.AssetType, type))
throw new ArgumentException($"The type {attribute.AssetType.Name} already has an associated property node graph type.");
}
}
if (scanTypes.Types.TryGetValue(typeof(AssetPropertyGraphDefinitionAttribute), out var definitionTypes))
{
foreach (var type in definitionTypes)
{
var attribute = type.GetCustomAttribute<AssetPropertyGraphDefinitionAttribute>();
if (attribute is null)
continue;
if (type.GetConstructor(Type.EmptyTypes) is null)
throw new InvalidOperationException($"The type {type.Name} does not have a public parameterless constructor.)");
if (NodeGraphDefinitions.ContainsKey(attribute.AssetType))View on GitHub (pinned to 96fad776d2)