Syncfusion provides project templates for Visual Studio Code to create Syncfusion Blazor applications. Syncfusion Blazor creates applications with the required Syncfusion NuGet packages, namespaces, and component render code for the Calendar, Button, and DataGrid components, and the style for making development easier with Syncfusion components.
The Syncfusion Visual Studio Code project template provides support for Blazor project templates from
v17.4.0.39
.
The following steps help you create Syncfusion Blazor Applications through the Visual Studio Code:
Click either Next or the Project Type tab. The Syncfusion Blazor Project Types will appears. Choose one of the Syncfusion Blazor project types:
In the Syncfusion Blazor WebAssembly App project type, we can choose ASP.NET Core hosted, Progressive Web Application, or both.
ASP.NET Core hosted and Progressive Web Application options are only visible for the Blazor Web Assembly App project type.
The latest Syncfusion Blazor NuGet packages, styles, namespaces, and component render code for Syncfusion components are added in the created application.
The Syncfusion.Blazor
NuGet package will be added as NuGet references for all application types.
The selected theme is added from Syncfusion NuGet and its reference at these applications locations in Blazor.
Application type | File location |
---|---|
Syncfusion Blazor Server App | {Project location}\Pages\_Host.cshtml |
Syncfusion Blazor WebAssembly App (ASPNET Core hosted) Syncfusion Blazor WebAssembly App (Progressive Web Application) |
{Client Project location}\wwwroot\index.html |
Syncfusion Blazor WebAssembly App | {Project location}\wwwroot\index.html |
The Syncfusion Blazor namespaces are added in the _imports.razor
file.
The Calendar, Button, and DataGrid component render code is in the Razor files in the pages folder. The render code is updated in these Razor files.
File name | Code snippet added |
---|---|
~/Pages/Index.razor |
![]() |
~/Pages/Counter.razor |
![]() |
~/Pages/FetchData.razor |
![]() |