stride3d/stride · error · InvalidOperationException
Could not find type [{gameTypeName}] in project [{projectNam
Error message
Could not find type [{gameTypeName}] in project [{projectName}] What it means
GameDebuggerTarget.GameLaunch tries to locate the game's entry type in the loaded assemblies of the debugged project using GameEnumerateTypesHelper, matching on FullName against gameTypeName. If no such type exists, it throws InvalidOperationException('Could not find type [type] in project [project]'). This indicates the debugger target launched a project whose Game-derived type could not be found, so a Game instance cannot be instantiated for debugging.
Solutions
- Verify the fully-qualified type name in the launch/debug configuration matches the actual class (namespace + name)
- Update the project's startup/entry type in the Stride Game Studio (Package properties) after any rename
- Rebuild the project so the assembly containing the type is loaded before enumeration
- Check the type derives from Stride.Engine.Game and compiles into the launched project (not excluded by conditional compilation)
Example fix
// before (launch config)
"GameTypeName": "MyNamespace.MyGameOld"
// after
class MyGame : Game { } // namespace MyNamespace
"GameTypeName": "MyNamespace.MyGame" Defensive patterns
Strategy: try-catch
Validate before calling
var loaded = AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => { try { return a.GetTypes(); } catch { return Type.EmptyTypes; } });
bool exists = loaded.Any(t => t.FullName == gameTypeName && typeof(Game).IsAssignableFrom(t)); Type guard
static bool IsLaunchableGameType(Type t) => t != null && !t.IsAbstract && typeof(Game).IsAssignableFrom(t);
Try / catch
try { Launch(...); } catch (InvalidOperationException ex) when (ex.Message.StartsWith("Could not find type")) { logger.Error(ex, "Check the game type name in launch settings"); } Prevention
- Keep the launch-profile game type name in sync with renames of the Game class/namespace
- Regenerate launch configurations from the Stride Game Studio rather than hand-editing
- Ensure the project builds for the selected configuration/platform so the type is present in the loaded assembly
- Verify the entry type derives from Stride.Engine.Game
When it happens
Trigger: Launching the Stride game debugger with a gameTypeName (from project settings) that does not exist in the compiled project assemblies; the assembly not yet loaded or enumerated under the lock; namespace renamed so FullName no longer matches; main game class deleted or renamed after the launch profile was configured.
Common situations: Renaming the Game class or its namespace without updating the Stride launcher/debugger configuration; building a different configuration/platform where the type is excluded; stale project reference in the debugger target pointing at an outdated assembly.
Related errors
- Invalid fulltype name [${fullyQualifiedTypeName}], expecting
- Custom strides is not supported with packed PixelFormats
- Unable to find the base [{AssetItem.Asset.Archetype.Location
- Unable to find the graph corresponding to the base part
- An IObjectNode was expected when processing the path [{path}
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/55d6f95f43add5c7.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Debugger/Debugger/GameDebuggerTarget.cs:155
return GameEnumerateTypesHelper().Select(x => x.FullName).ToList();
}
}
/// <inheritdoc/>
public void GameLaunch(string gameTypeName)
{
try
{
Log.Info($"Running game with type {gameTypeName}");
Type gameType;
lock (loadedAssemblies)
{
gameType = GameEnumerateTypesHelper().FirstOrDefault(x => x.FullName == gameTypeName);
}
if (gameType == null)
throw new InvalidOperationException($"Could not find type [{gameTypeName}] in project [{projectName}]");
game = (Game)Activator.CreateInstance(gameType);
// TODO: Bind database
Task.Run(() =>
{
gameFinished.Reset();
try
{
using (game)
{
// Allow scripts to crash, we will still restart them
game.Script.Scheduler.PropagateExceptions = false;
game.Run();
}
}
catch (Exception e)
{View on GitHub (pinned to 96fad776d2)