fix(templates): Fixing the case when wasm or auto project are generet…#228
Merged
Conversation
…ed sln file is genereted with broken paths to projects
kdinev
previously approved these changes
Jun 22, 2026
kdinev
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the
igb-blazorproject template so that generating a WebAssembly or Auto project with a space in its name produces a working solution. Previously the.slnreferenced 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
sourceNameis now a dotted token (IgniteBlazorApp.1), with a separatesafe_namespacetoken (IgniteBlazorApp._1) used for C# namespaces. This stops the template engine's solution-file sanitization from rewriting the project paths, so the.slnkeeps 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):
Component(s) / Area(s) Affected:
IgniteUI.Blazor.Templatespack (igb-blazorproject template)How Has This Been Tested?
Generated six projects with
dotnet new igb-blazorcovering 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.slnpaths match the generated folders.Test Configuration:
Screenshots / Recordings
Checklist:
README.MDCHANGELOG.MDupdates for newly added functionalityCloses #