Repository navigation
Scaffolding for Syncfusion Blazor Toolkit included. - #3863
Conversation
Scaffolding for Syncfusion Blazor Toolkit included.
Scaffolding package issues were cleared.
Scaffolding related review concerns addressed.
|
Thanks for the contribution! I’d like to clarify the intended scope of this scaffolder. Its purpose should be to minimally set up the free Syncfusion Blazor Toolkit in an existing Blazor app—for example, adding the package and the required service registration, imports, and stylesheet. It should not generate substantial sample content or an application-specific experience. The Healthcare Tracker page, dashboard UI, and associated templates are well beyond that scope. Could you revise the PR to focus on Toolkit setup and remove the Healthcare Tracker sample? The command name and description should also reflect that setup purpose. |
Scaffolding related review concerns addressed.
Modified the scaffolding setup instruction steps.
Scaffolding modified to compatible with latest nuget release.
Hi @danroth27, The PR has been updated to align with the intended scope of the scaffolder. The Healthcare Tracker sample, dashboard UI, and related templates have been removed. The scaffolder now focuses solely on the minimal setup required for integrating Syncfusion Blazor Toolkit into an existing Blazor application, including package installation, service registration and required imports. |
…ve dead recipe code and stale comments Co-authored-by: Indhumathy-Loganathan <[email protected]>
…lding/dotnet-scaffold/dotnet-scaffold.csproj Co-authored-by: Indhumathy-Loganathan <[email protected]>
…0-s-practical-way-address-four-review Address Syncfusion Blazor Toolkit scaffolder review: classification, hosting facts, summary, MSBuild, baselines
…s; drop explanatory comments in PackageConstants Co-authored-by: Indhumathy-Loganathan <[email protected]>
…0-s-practical-way-address-four-review Make relative-project-path test portable to macOS symlinked temp paths; drop explanatory comments in PackageConstants
There was a problem hiding this comment.
🟡 Changes recommended
Project classification rejects valid Blazor hosts, and package and hosting summaries can report incorrect outcomes.
4 open issues
What changed in this PR
Adds setup-only Syncfusion Blazor Toolkit scaffolding to the existing Blazor command pipeline, without generating pages or adding stylesheet links.
Changes:
- Registers package, service, and imports setup for supported Blazor projects and referenced WebAssembly clients.
- Adds project classification, hosting inspection, verification, and outcome summaries.
- Adds focused tests and runnable .NET 10/11 baselines with fixture-scoped package feeds.
| File | Description |
|---|---|
| test/dotnet-scaffolding/dotnet-scaffold.Tests/Helpers/ScaffolderBaselineRunner.cs | Allows fixture-specific NuGet configuration. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/Helpers/ScaffoldCliHelper.cs | Adds scoped Syncfusion package feeds. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/ScaffoldSteps/Syncfusion/SyncfusionBlazorToolkitSettingsTests.cs | Tests settings and change tracking. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/ScaffoldSteps/Syncfusion/SummarizeSyncfusionBlazorToolkitStepTests.cs | Tests summaries and hosting guidance. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/Syncfusion/SyncfusionBlazorToolkitRunnableBaselineTests.cs | Checks runnable default output. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/Syncfusion/SyncfusionBlazorToolkitNet9IntegrationTests.cs | Covers .NET 9 setup layouts. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/Syncfusion/SyncfusionBlazorToolkitNet8IntegrationTests.cs | Covers .NET 8 setup and reruns. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/Syncfusion/SyncfusionBlazorToolkitNet11IntegrationTests.cs | Covers .NET 11 setup layouts. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/Syncfusion/SyncfusionBlazorToolkitNet10IntegrationTests.cs | Covers .NET 10 setup layouts. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/Syncfusion/SyncfusionBlazorToolkitIntegrationTestsBase.cs | Provides shared CLI fixtures and assertions. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Helpers/Syncfusion/BlazorProjectClassifierTests.cs | Tests classification and hosting inspection. |
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Helpers/BlazorWebAssemblyClientProjectResolverTests.cs | Tests imported client references. |
| test/dotnet-scaffolding/baselines/README.md | Documents Toolkit baseline coverage. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css | Preserves baseline Bootstrap RTL styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css | Preserves baseline Bootstrap styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/wwwroot/app.css | Preserves baseline application styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Properties/launchSettings.json | Supplies baseline launch profiles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Program.cs | Records expected Toolkit registration. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Routes.razor | Preserves baseline routing. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Pages/Weather.razor | Preserves the template weather page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Pages/NotFound.razor | Preserves the template not-found page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Pages/Home.razor | Preserves the template home page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Pages/Error.razor | Preserves the template error page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Pages/Counter.razor | Preserves the interactive counter page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Layout/ReconnectModal.razor.js | Preserves baseline reconnection behavior. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Layout/ReconnectModal.razor.css | Preserves reconnection styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Layout/ReconnectModal.razor | Preserves reconnection markup. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Layout/NavMenu.razor.js | Preserves navigation toggle behavior. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Layout/NavMenu.razor.css | Preserves navigation styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Layout/NavMenu.razor | Preserves navigation markup. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Layout/MainLayout.razor.css | Preserves application layout styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/Layout/MainLayout.razor | Preserves application layout markup. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/App.razor | Preserves the host without Toolkit stylesheet links. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/Components/_Imports.razor | Records the expected Toolkit import. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/BlazorWebApp.csproj | Records the expected Toolkit package. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/appsettings.json | Supplies baseline application configuration. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net11.0/BlazorWebApp/appsettings.Development.json | Supplies baseline development logging. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css | Preserves baseline Bootstrap RTL styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css | Preserves baseline Bootstrap styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/wwwroot/app.css | Preserves baseline application styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Properties/launchSettings.json | Supplies baseline launch profiles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Program.cs | Records expected Toolkit registration. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Routes.razor | Preserves baseline routing. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Pages/Weather.razor | Preserves the template weather page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Pages/NotFound.razor | Preserves the template not-found page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Pages/Home.razor | Preserves the template home page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Pages/Error.razor | Preserves the template error page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Pages/Counter.razor | Preserves the interactive counter page. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Layout/ReconnectModal.razor.js | Preserves baseline reconnection behavior. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Layout/ReconnectModal.razor.css | Preserves reconnection styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Layout/ReconnectModal.razor | Preserves reconnection markup. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Layout/NavMenu.razor.css | Preserves navigation styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Layout/NavMenu.razor | Preserves navigation markup. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Layout/MainLayout.razor.css | Preserves application layout styles. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/Layout/MainLayout.razor | Preserves application layout markup. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/App.razor | Preserves the host without Toolkit stylesheet links. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/Components/_Imports.razor | Records the expected Toolkit import. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/BlazorWebApp.csproj | Records the expected Toolkit package. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/appsettings.json | Supplies baseline application configuration. |
| test/dotnet-scaffolding/baselines/BlazorToolkit/net10.0/BlazorWebApp/appsettings.Development.json | Supplies baseline development logging. |
| src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Roslyn/Services/MSBuildProjectService.cs | Exposes evaluated items and metadata. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/ScaffoldSteps/Syncfusion/VerifySyncfusionBlazorToolkitStep.cs | Verifies post-setup project state. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/ScaffoldSteps/Syncfusion/ValidateSyncfusionBlazorToolkitStep.cs | Validates projects and resolves clients. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/ScaffoldSteps/Syncfusion/SummarizeSyncfusionBlazorToolkitStep.cs | Reports changes and hosting guidance. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/ScaffoldSteps/Syncfusion/Settings/SyncfusionBlazorToolkitSettings.cs | Tracks project state and outcomes. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/ScaffoldSteps/Syncfusion/ApplySyncfusionBlazorToolkitProgramCsStep.cs | Applies Toolkit service registration. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/ScaffoldSteps/Syncfusion/ApplySyncfusionBlazorToolkitImportsStep.cs | Applies Toolkit Razor imports. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/Helpers/Syncfusion/BlazorProjectClassifier.cs | Classifies supported Blazor projects. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/Helpers/Syncfusion/BlazorHostingInspector.cs | Inspects hosting and render modes. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/Extensions/Syncfusion/SyncfusionBlazorToolkitScaffolderBuilderExtensions.cs | Configures server and client setup steps. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/Common/PackageConstants.cs | Defines the Toolkit package. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/Commands/AspnetStrings.cs | Adds command metadata and examples. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/AspNetCommandService.cs | Registers the Toolkit command pipeline. |
Review effort: Balanced
…ly hosting detection, central package version Co-authored-by: Indhumathy-Loganathan <[email protected]>
Co-authored-by: Indhumathy-Loganathan <[email protected]>
…-4-review Address review: RCL-hosted Blazor detection, --prerelease, startup-only hosting, and central package versions
…re test does not apply Co-authored-by: Indhumathy-Loganathan <[email protected]>
…-4-review Rename Toolkit integration fixture base so generic NuGet.config fixture test does not apply
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved detection bugs can classify noncompiled Razor samples as Blazor apps, enabling unintended project modifications, and misreport global page render modes from comments or unrelated components.
2 open issues
Review effort: Balanced
…comments); exclude None Razor files from Blazor classification Co-authored-by: Indhumathy-Loganathan <[email protected]>
…-4-review Toolkit scaffolding: address review (active Routes render mode, exclude None Razor files) and fixture base rename
…am ScaffolderBaselineRunner Co-authored-by: Indhumathy-Loganathan <[email protected]>
…itionalPackageSources Co-authored-by: Indhumathy-Loganathan <[email protected]>
…-4-review Fix Toolkit baseline test compile error after upstream merge (additionalPackageSources)


Summary
This PR adds a minimal Syncfusion Blazor Toolkit setup scaffolder for existing Blazor applications.
The scaffolder installs the
Syncfusion.Blazor.Toolkitpackage (latest, including 2.0.0+), registersAddSyncfusionBlazorToolkit()inProgram.cs, and adds@using Syncfusion.Blazor.Toolkitto the project’s_Imports.razor. It does not generate pages or sample UI, and does not inject a host stylesheet — styles ship with the 2.0.0+ assembly and are activated through DI.It supports Blazor Web App and standalone Blazor WebAssembly layouts, discovers
_Imports.razorunderComponentsor at the project root, and detects multi-project Auto layouts (.Clientsibling) so the summary can guide users to run the scaffolder on both server (services) and client (imports) projects.Key Changes
1. Command registration & package metadata
AspNetCommandService.cs— Registeredsyncfusion-blazor-toolkitscaffolder (validate → add packages → code change → summarize); addedValidateSyncfusionBlazorToolkitStepandSummarizeSyncfusionBlazorToolkitStep.AspnetStrings.cs— Command name, display name, description, example, andSyncfusioncategory; documents setup-only scope, 2.0.0+ no-stylesheet behavior, and Auto multi-project guidance.PackageConstants.cs— AddedSyncfusionBlazorToolkitPackage(UseLatestVersion = true).NuGet.config— Addednuget.orgsource for package resolution.2. Scaffold pipeline (extensions, helpers, steps)
SyncfusionBlazorToolkitScaffolderBuilderExtensions.cs(new) — Package install step; code-modification step; multi-project layout detection (SingleProject/AutoServer/AutoClient).SyncfusionBlazorToolkitHelper.cs(new) — Resolves Program.cs-only code-mod config; idempotent on-diskEnsureServiceRegistration()andEnsureImportsUsing().SyncfusionBlazorToolkitSettings.cs(new) — Settings +SyncfusionBlazorToolkitLayoutenum.ValidateSyncfusionBlazorToolkitStep.cs(new) — Project validation,_Imports.razordiscovery, package/service state.SummarizeSyncfusionBlazorToolkitStep.cs(new) — Outcome summary and multi-project guidance.3. Code-modification configs
syncfusionBlazorToolkitChanges.jsonunderTemplates/net8.0|net9.0|net10.0|net11.0/CodeModificationConfigs/— Program.cs only: insertAddSyncfusionBlazorToolkit()and usingSyncfusion.Blazor.Toolkit(no stylesheet entries).4. Tests
SyncfusionBlazorToolkitHelperTests,HelperDiagnosticTests,TfmConfigTests,SettingsTests,Validate*StepTests,Summarize*StepTests.Integration/Syncfusion/.Usage
Create a Blazor app and apply the Syncfusion Toolkit scaffold:
Output
Validation
dotnet scaffold aspnet syncfusion-blazor-toolkit --project <path>on Blazor Web App projects.Syncfusion.Blazor.Toolkitpackage reference is added (latest / prerelease when requested).AddSyncfusionBlazorToolkit()is registered inProgram.cs.@using Syncfusion.Blazor.Toolkitis added to_Imports.razor(Components or root).<link>is injected (2.0.0+ behavior)..Client)._Imports.razoris missing.