Skip to content

regression: Empty project fails to load if project name contains spaces #3356

Description

@ourabigdev

Release Type: Official Release

Version: 4.4 beta 5

Platform(s): Windows

Describe the bug
Creating a new empty project fails if you use spaces in the project name. The engine tries to look for .csproj files formatted with underscores (e.g. The_Quiet_Archive.Game.csproj) inside a folder created with spaces (The Quiet Archive), leading to path resolution errors, failed NuGet restores, and script deserialization issues.

The First Person template worked fine because its default template name didn't have spaces, which helped pinpoint that spaces in the name were causing the failure.

To Reproduce
Steps to reproduce the behavior:

  1. Open Stride 4.4 beta 5.
  2. Create a new empty project.
  3. Enter a project name containing spaces (e.g. The Quiet Archive).
  4. Creation fails during load with missing path errors.

Expected behavior
Projects created with spaces in their name should load without path resolution errors, or the engine should handle path sanitization consistently.

Screenshots
N/A

Log and callstacks

Verbose: Restore NuGet packages for The Quiet Archive.slnx...
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Windows\The_Quiet_Archive.Windows.csproj(0,0)]: Error: The project file could not be loaded. Could not find a part of the path 'D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Windows\The_Quiet_Archive.Windows.csproj'.  D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Windows\The_Quiet_Archive.Windows.csproj
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Error: The project file could not be loaded. Could not find a part of the path 'D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj'.  D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Process dependencies for The Quiet Archive.Game...
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Restore NuGet packages for The Quiet Archive.Game...
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Loading Assets from Package [Stride.Engine.sdpkg]
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Loading Assets from Package [Stride.Graphics.sdpkg]
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Loading Assets from Package [Stride.Particles.sdpkg]
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Loading Assets from Package [Stride.Rendering.sdpkg]
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Loading Assets from Package [Stride.SpriteStudio.Offline.sdpkg]
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Loading Assets from Package [Stride.Video.sdpkg]
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Loading Assets from Package [The Quiet Archive.Game.sdpkg]
Warning: MainScene(30,55): Could not deserialize object of type 'The_Quiet_Archive.BasicCameraController'; replacing it with an object implementing IUnloadable
YamlException: Unable to resolve tag [!The_Quiet_Archive.BasicCameraController,The_Quiet_Archive.Game] to type from tag resolution or registered assemblies ((Lin: 29, Col: 54, Chr: 1296) -> (Lin: 30, Col: 24, Chr: 1384))
   at Stride.Core.Yaml.Serialization.Serializers.TagTypeSerializer.ReadYaml(ObjectContext& objectContext) in /_/sources/core/Stride.Core.Yaml/Serialization/Serializers/TagTypeSerializer.cs:line 81
   at Stride.Core.Yaml.Serialization.Serializers.ChainedSerializer.ReadYaml(ObjectContext& objectContext) in /_/sources/core/Stride.Core.Yaml/Serialization/Serializers/ChainedSerializer.cs:line 109
   at Stride.Core.Yaml.ErrorRecoverySerializer.ReadYaml(ObjectContext& objectContext) in /_/sources/assets/Stride.Core.Assets/Yaml/ErrorRecoverySerializer.cs:line 48

[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Info: Registered platform exec project: The Quiet Archive.Windows (Windows)
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Verbose: Restore NuGet packages for The Quiet Archive.slnx...
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Error: The project file could not be loaded. Could not find a part of the path 'D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj'.  D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Windows\The_Quiet_Archive.Windows.csproj(0,0)]: Error: The project file could not be loaded. Could not find a part of the path 'D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Windows\The_Quiet_Archive.Windows.csproj'.  D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Windows\The_Quiet_Archive.Windows.csproj
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Windows\The_Quiet_Archive.Windows.csproj(0,0)]: Verbose: Process dependencies for The Quiet Archive.Windows...
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Windows\The_Quiet_Archive.Windows.csproj(0,0)]: Verbose: Restore NuGet packages for The Quiet Archive.Windows...
[D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj(0,0)]: Error: The project file 'D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj' could not be loaded when referenced by D:\Projects(Gamedev)\The Quiet Archive\The Quiet Archive.Windows\The Quiet Archive.Windows.csproj. Could not find a part of the path 'D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj'.  D:\Projects(Gamedev)\The Quiet Archive\The_Quiet_Archive.Game\The_Quiet_Archive.Game.csproj 

Additional context
Workaround: Naming the project without spaces (e.g. TheQuietArchive) works completely fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions