Skip to content

fix(templates): Fixing the case when wasm or auto project are generet…#228

Merged
kdinev merged 2 commits into
masterfrom
dkalinov/spaces-in-name-fix
Jun 22, 2026
Merged

fix(templates): Fixing the case when wasm or auto project are generet…#228
kdinev merged 2 commits into
masterfrom
dkalinov/spaces-in-name-fix

Conversation

@dkalinovInfra

Copy link
Copy Markdown
Contributor

Description

Fixes the igb-blazor project template so that generating a WebAssembly or Auto project with a space in its name produces a working solution. Previously the .sln referenced the projects with spaces replaced by underscores (e.g. My_App\My_App.csproj) while the actual folders kept the spaces (My App\My App.csproj), so the generated solution could not load or build.

The fix follows the same approach as the built-in Microsoft Blazor template: the template sourceName is now a dotted token (IgniteBlazorApp.1), with a separate safe_namespace token (IgniteBlazorApp._1) used for C# namespaces. This stops the template engine's solution-file sanitization from rewriting the project paths, so the .sln keeps the same names as the folders, while namespaces and assembly names still resolve to valid identifiers (My_App).

Motivation / Context

Project names containing spaces produced a broken solution file with paths that did not match the generated folders, so WASM/Auto projects failed to open and build.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog

Component(s) / Area(s) Affected:

IgniteUI.Blazor.Templates pack (igb-blazor project template)

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Generated six projects with dotnet new igb-blazor covering each hosting model (Server / WebAssembly / Auto) with both a spaced and an unspaced name, and verified that each restores and builds with no errors and that the .sln paths match the generated folders.

Test Configuration:

  • .NET version: net10.0
  • Hosting model: Server / WebAssembly / Auto
  • Browser(s):
  • OS: Windows

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code
  • This PR includes API docs for newly added methods/properties
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Closes #

…ed sln file is genereted with broken paths to projects
kdinev
kdinev previously approved these changes Jun 22, 2026
Comment thread .gitignore Outdated
@kdinev kdinev merged commit 1789eda into master Jun 22, 2026
7 checks passed
@kdinev kdinev deleted the dkalinov/spaces-in-name-fix branch June 22, 2026 07:58
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.

2 participants