Skip to content

Fix new projects whose name contains spaces (#3356) - #3406

Merged
xen2 merged 2 commits into
stride3d:masterfrom
xen2:fix/template-name-with-spaces
Sep 9, 2026
Merged

xen2 merged 2 commits into
stride3d:masterfrom
xen2:fix/template-name-with-spaces

Conversation

@xen2

@xen2 xen2 commented Sep 8, 2026

Copy link
Copy Markdown
Member

PR Details

With a project name containing spaces, the template engine renamed files with the raw name
(The Quiet Archive.Game.csproj) but substituted its safe form in file contents
(The_Quiet_Archive.Game.csproj), so the solution, the exec project and the sdpkg path pointed
at files that did not exist.

  • Both now use a compact form of the name: whitespace removed, a dot before a digit becomes
    an underscore, then the engine's identifier cleanup. "The Quiet Archive" -> TheQuietArchive,
    "Game 1.5" -> Game1_5, "2D Game" -> _2DGame. The root directory keeps the raw name.
  • Game Studio saves its own solution, named from the New Project dialog, so it now passes a
    hidden skipSolution parameter instead of leaving the template's solution behind when the
    names differ.
  • Smoke test cases for a name with spaces and for skipSolution.

Verified with dotnet new, stride new, and a build of the generated project. The Game Studio
dialog itself was not exercised interactively.

Related Issue

Fixes #3356

xen2 added 2 commits September 9, 2026 00:45
The template engine used the raw name for file names but its safe form
for file contents, so The Quiet Archive.Game.csproj was referenced as
The_Quiet_Archive.Game.csproj. Both now use a compact form of the name
with whitespace removed (TheQuietArchive).

Game Studio saves its own solution, named from the New Project dialog,
so it now asks the template not to emit one (skipSolution) instead of
leaving a second solution behind when the names differ.
@xen2
xen2 merged commit a7eac0e into stride3d:master Sep 9, 2026
32 checks passed
@xen2
xen2 deleted the fix/template-name-with-spaces branch September 9, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant