Syncfusion Blazor Extension Now Available for Visual Studio Code | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (174).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (217)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (917)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (148)Chart  (131)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (629)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (507)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (593)What's new  (332)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Syncfusion Blazor Extension is available for Visual Studio Code

Syncfusion Blazor Extension Now Available for Visual Studio Code

Blazor is a next-generation platform for developing single-page applications (SPA) by building client-side web apps using .NET. It supports writing C# code instead of using JavaScript for client-side web applications. Syncfusion has already provided the Blazor extension in Visual Studio for:

  • Creating Syncfusion Blazor applications.
  • Converting Blazor applications to Syncfusion Blazor applications.
  • Migrating Syncfusion Blazor applications from one version to another.

Now, Syncfusion provides the Blazor extension for Visual Studio Code.

The various features of this extension, such as installing NuGet packages, applying themes as CDN, and applying built-in templates, make it a useful tool for developers. The basic structure of the Blazor project templates with Syncfusion components is useful for developers interested in building an application.

In this blog, I am going to explain how to create a Syncfusion Blazor application and how to convert and migrate Blazor applications configured with Syncfusion components in Visual Studio Code.

Prerequisites

The prerequisites for creating a Blazor application are:

Installing the Syncfusion Blazor extension

The Syncfusion Blazor extension for Visual Studio Code is available from the Syncfusion Blazor setup in the Syncfusion Essential Studio 2019 Volume 4 release. The extension is also available in the Visual Studio Marketplace.

Installing from Visual Studio Marketplace

To install the Syncfusion Blazor extension from the Visual Studio Marketplace, follow these steps:

  1. Open Visual Studio Code.
  2. Open the Command Palette by navigating to View > Command Palette.
  3. Search for Install Extensions in the Command Palette and expand Install Extensions when it appears.
  4. Search for Syncfusion Blazor in the search box to locate the Syncfusion Blazor extension package.
  5. Install the Syncfusion Blazor extension by clicking Install.

Installing from a VSIX package

To install the Syncfusion Blazor extension from a VSIX package, follow these steps:

  1. Open Visual Studio Code.
  2. Open the Command Palette by navigating to View > Command Palette.
  3. Search for Install, and then click Install from VSIX in the Command Palette.
  4. Select Syncfusion Blazor Extension from the Browse The extension will be installed.

Creating a Syncfusion Blazor application

The Syncfusion Blazor extension helps developers create Blazor applications with Syncfusion components, saving them significant time. The following steps create a Syncfusion Blazor application:

  1. Open Visual Studio Code.
  2. Open the Command Palette by navigating to View > Command Palette.Command Palette in Visual Studio Code - Syncfusion Blazor extension for Visual Studio Code
  3. Select the Create Syncfusion Blazor Project option by searching for Syncfusion Blazor.
  4. Provide the project location to store the application.Project location to store the application
  5. Name the application.Naming the application
  6. Select the Blazor application type.Selecting Blazor application type
  7. Choose a theme.Choosing a theme

And that’s it. The Blazor application has been created with the required NuGet package and CDN links of the Syncfusion components for the project.

Generated Syncfusion Blazor Application
Generated Syncfusion Blazor Application

Now, you can develop your application with Syncfusion components. When creating a Syncfusion Blazor application, snippets for the Calendar, Grid, and Button components are added. You can run these Syncfusion Blazor components without any changes in the source.

Refer to this documentation to render the code and run the application.

Debugging the application

The Debug and Release modes are configured while the project is created. So, you do not need to configure them manually. When debugging the Syncfusion Blazor application, it will restore the NuGet packages, compile the application, and run the application in the default browser.

By default, the Blazor application runs in Debug mode. It can be changed to Release mode in the Debug tab (Ctrl+Shift+D).

Changing the Debug Mode
Changing the Debug Mode

Convert Blazor application to use Syncfusion components

A Blazor application can be converted to use Syncfusion Blazor components in Visual Studio Code by using the Convert to Syncfusion Blazor Application add-in. This add-in configures the required Syncfusion NuGet packages and CDN links in an application.

To convert an existing Blazor app to a Syncfusion Blazor application:

  1. Open the Blazor web application, and then right-click the project file (.csproj) in the workspace. The Convert to Syncfusion Blazor application option will appear in the context menu.

    Conversion option in Syncfusion Blazor extension for Visual Studio Code
    Conversion option
  2. Choose the required Syncfusion Blazor version and theme. The application will be converted to include Syncfusion NuGet packages and CDN links. Now, you can develop the application with Syncfusion components.

Migrate the Syncfusion Blazor version

The Syncfusion Blazor application can be migrated to another Syncfusion version by using the Migrate Syncfusion Blazor Application to Another Version add-in. The add-in updates the Syncfusion Blazor NuGet packages and CDN version.

To migrate a Syncfusion Blazor application:

  1. Open the Blazor web application with Syncfusion components configured, and then right-click the project file (.csproj) in the workspace. The Migrate Syncfusion Blazor application to another version option will be listed in the context menu.

    Migration option in Syncfusion Blazor extension for Visual Studio Code
    Migration option
  2. Choose the required Syncfusion Blazor version. The application will be migrated to use the desired Syncfusion NuGet package and CDN link versions.

Conclusion

I hope this blog helps you understand and use the Syncfusion Blazor extension in Visual Code to its full potential. Easily create Syncfusion Blazor applications, convert existing Blazor applications to Syncfusion Blazor applications, and migrate Syncfusion Blazor apps to different versions.

Syncfusion provides more than 65 high-performance, lightweight, modular, and responsive Blazor UI controls such as Data Grid, Charts, and Scheduler to ease the work of developers.

If you have any questions, please let us know in the comments section below. You can also contact us through our support forum, Direct-Trac, or feedback portal. We are always happy to assist you!

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed