Useful Visual Studio Extensions for Working with Blazor
Tags: dotnet, webdev, devops, opensource
Published: 2021-06-09 23:26:32

---
canonical_url: https://developer.mescius.com/blogs/useful-visual-studio-extensions-blazor
description: Sometimes having the right tool makes the job easier. Let's take a look at some Visual Studio/VSCode extensions for Blazor.
---
Blazor is a free and open-source web framework from Microsoft that enables the development of interactive and reusable web UIs using the C# programming language instead of JavaScript. In this blog, we’ll share some useful extensions that make development with Blazor easier.

## About Blazor Extensions

You typically develop a Blazor application in Visual Studio or Visual Studio Code (VS Code) using C# with some occasional HTML, CSS, and JavaScript. Blazor Visual Studio Extensions facilitate code reusability and help improve coding efficiency and workflow by saving time with helpful functions and debugging capabilities. They can also help speed up user interface design.

![Blazor](//cdn.mescius.io/umb/media/rdhnp0l1/blazor.png?rmode=max&width=334&height=334)

## Blazor Snippets

[<span>Blazor Snippets</span>](https://marketplace.visualstudio.com/items?itemName=ScottSauber.blazorsnippets "https://marketplace.visualstudio.com/items?itemName=ScottSauber.blazorsnippets") provides common code snippets for building apps in Blazor using Visual Studio or VS Code. This extension increases productivity, letting you spend less time writing boilerplate code and more time writing main application codes.

Blazor’s Snippets was officially released by Scott Sauber in November 2018\. So far, this extension is one of the most downloaded Blazor extensions on the [<span>Visual Studio Marketplace</span>](https://marketplace.visualstudio.com/search?term=blazor&target=VSCode&category=All%20categories&sortBy=Relevance "https://marketplace.visualstudio.com/search?term=blazor&target=VSCode&category=All%20categories&sortBy=Relevance"), with over 15,000 downloads.

For more information about Blazor Snippets, including how to contribute to its development, check out the official [<span>GitHub repository</span>](https://github.com/scottsauber/BlazorSnippets "https://github.com/scottsauber/BlazorSnippets").

## Blazory

The [<span>Blazory</span>](https://marketplace.visualstudio.com/items?itemName=BartVanHoey.blazory "https://marketplace.visualstudio.com/items?itemName=BartVanHoey.blazory") extension is known for its elegance and ease of use. Created by Bart Van Hoey, this tool is designed to speed up your Blazor development process by providing you with useful Blazor code snippets.

Officially released on July 27, 2020, the Blazory extension is stable and also in active development. For more details regarding its release cycle and how to contribute to this project, check out the official [<span>GitHub repository</span>](https://github.com/bartvanhoey/Blazory.git "https://github.com/bartvanhoey/Blazory.git").

## Microsoft’s VSCode Blazor Debugging Extension

Microsoft’s VSCode [<span>Blazor debugging extension</span>](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.blazorwasm-companion "https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.blazorwasm-companion") is a companion extension for debugging Blazor WebAssembly applications in VS Code. It brings some improvements to the experience of debugging Blazor WebAssembly in VS Code. To use this extension, you must also install a C# extension for Visual Studio Code.

This extension was released in February 2021, and since its release, it has pulled over 115k downloads on the Visual Studio Marketplace. It has a vibrant development team listed on its official [<span>GitHub repository</span>](https://github.com/dotnet/aspnetcore-tooling.git "https://github.com/dotnet/aspnetcore-tooling.git").

## Blazor Snippet Pack

[<span>Blazor Snippet Pack</span>](https://marketplace.visualstudio.com/items?itemName=adrianwilczynski.blazor-snippet-pack "https://marketplace.visualstudio.com/items?itemName=adrianwilczynski.blazor-snippet-pack") includes an amazing Blazor generation feature. It is easy to use and beautifully designed with developer productivity at heart.

Adrian Wilczyński created the Blazor Snippet Pack in 2019 using the [<span>VSCode Snippet Generator</span>](https://vscodesnippetgenerator.azurewebsites.net/ "https://vscodesnippetgenerator.azurewebsites.net/"). It has over 153k downloads and an active [GitHub repository](https://github.com/AdrianWilczynski/BlazorSnippetPack "https://github.com/AdrianWilczynski/BlazorSnippetPack").

## Razor / Blazor CSS IntelliSense

[<span>Razor / Blazor CSS IntelliSense</span>](https://marketplace.visualstudio.com/items?itemName=kevin-chatham.aspnetcorerazor-html-css-class-completion "https://marketplace.visualstudio.com/items?itemName=kevin-chatham.aspnetcorerazor-html-css-class-completion") is a fork of [HTML CSS Class Completion](https://github.com/zignd/HTML-CSS-Class-Completion "https://github.com/zignd/HTML-CSS-Class-Completion"), developed and released by Kevin Chatham in February 2021\. This extension is a drop-in replacement for HTML CSS Class Completion and has out-of-the-box Razor and Blazor support.

Note that it cannot work together with the HTML CSS Class Completion extension. Therefore, you must uninstall the HTML CSS Class Completion extension before using this extension.

Razor / Blazor CSS IntelliSense Visual Studio Code extension provides CSS class name completion for the HTML class attribute based on the definitions found in your workspace or external files referenced through the link element.

This extension:

1.  Gives you auto-completion for CSS class definitions that can be found in your workspace (defined in CSS files or in the file types listed in the Supported Language Modes section).
2.  Supports external stylesheets referenced through link elements in HTML files.
3.  Includes a command to manually re-cache the class definitions used in the autocompletion.
4.  Allows users to override which folders and files should be considered or excluded from the caching process.

It’s also very user-friendly and easy to customize to your preference. Access more information about this very active extension via [<span>GitHub</span>](https://github.com/Zignd/HTML-CSS-Class-Completion "https://github.com/Zignd/HTML-CSS-Class-Completion").

## ASP.NET Core Switcher

[<span>ASP.NET Core Switcher</span>](https://marketplace.visualstudio.com/items?itemName=adrianwilczynski.asp-net-core-switcher "https://marketplace.visualstudio.com/items?itemName=adrianwilczynski.asp-net-core-switcher") enables you to quickly switch between views, controllers, pages, page models, and Blazor components in the ASP.NET Core application using key bindings, a context menu, or a command palette.

It was officially released in April 2019 by Adrian Wilczyński and has an impressive number of downloads — over 250k. Aside from Blazor projects, this extension can be used for Razor and MVC projects. Here are some quick commands on how to switch pages using this extension in Blazor, Razor, and MVC projects.

### Blazor

Switch between Component (.razor) and its CodeBehind (.razor.cs) using:

1.  Keybindings: Alt + O
2.  Editor context menu: Right-click a blank space and select **Component**; right-click a blank space and select **CodeBehind**
3.  Command palette: Ctrl+Shift+P > **Component**; Ctrl + Shift + P > **CodeBehind**

### Razor Pages

Switch between Page and its PageModel using:

1.  Keybindings: Alt + O
2.  Editor context menu: Right-click a blank space and select **Page**; right-click a blank space and select**PageModel**
3.  Command palette: Ctrl + Shift + P > **Page**; Ctrl + Shift + P > **PageModel**

### MVC

Switch between View and Controller using:

1.  Keybindings: Alt + O (or Alt + I for backwards compatibility)
2.  Editor context menu: Right-click a blank space and select **Controller**; right-click a blank space and select **View**
3.  Command palette: Ctrl + Shift + P > **Controller**, Ctrl + Shift + P > **View**

Create a View for an Action using:

1.  Keybindings: Alt + P
2.  Editor context menu: Right-click a blank space and select **Add View**
3.  Command palette: Ctrl + Shift + P > **Add View**

This is an essential extension. It makes debugging in large projects much easier as you can seamlessly navigate from one file to another in just a few clicks.

More information about the future of this extension, its release cycle and how to contribute to the development of this extension can be accessed on their official [<span>GitHub repository</span>](https://github.com/AdrianWilczynski/AspNetCoreSwitcher "https://github.com/AdrianWilczynski/AspNetCoreSwitcher").

## Blazor Addons

With over 1.1k downloads, the [<span>Blazor Addons</span>](https://marketplace.visualstudio.com/items?itemName=tHop.blazoraddons "https://marketplace.visualstudio.com/items?itemName=tHop.blazoraddons") extension helps improve the workflow for Blazor. Officially released in May 2020 by tHop, this extension lets you quickly create component classes and partial classes in your Blazor projects on VS code. Check out its official [GitHub repository](https://github.com/hopstar/BlazorAddons "https://github.com/hopstar/BlazorAddons").

## Blazor Minimal Project Template

The [<span>Blazor Minimal Project Template</span>](https://marketplace.visualstudio.com/items?itemName=GregTrevellick.BlazorMinimalProjectTemplate "https://marketplace.visualstudio.com/items?itemName=GregTrevellick.BlazorMinimalProjectTemplate") works effectively in Visual Studio 2017 and 2019, providing users with a project template for a .Net Standard project with a minimal implementation of client-side Blazor (a web UI framework based on C#, Razor, and HTML that runs in the browser using WebAssembly). Access via code on its [GitHub repository](https://github.com/GregTrevellick/VsixBlazorMinimalProjectTemplate "https://github.com/GregTrevellick/VsixBlazorMinimalProjectTemplate").

## Blazor CRUD Template

Published by Faisal Pathan in December 2019, the [<span>Blazor CRUD Template</span>](https://marketplace.visualstudio.com/items?itemName=FaisalPathan.Faisal-Blazor-CRUD-Template "https://marketplace.visualstudio.com/items?itemName=FaisalPathan.Faisal-Blazor-CRUD-Template") works very effectively in Visual Studio 2019.

This extension provisions templates that include CRUD (Create, Read, Update, and Delete) operations and server-side pagination using Blazor, Dapper, and Entity Framework Core 3.1\. <strongr>You can access release details and contribution guides on the</strongr> [<span>GitHub repository</span>](https://github.com/faisal5170/BlazorDemo-Latest "https://github.com/faisal5170/BlazorDemo-Latest")<strongr>.</strongr>

## Blazor UI Components

It’s important to recall that Blazor apps are built using UI components. A component can be defined as a self-contained chunk of user interface (UI), such as a page, dialog, or form. It includes HTML markup and the processing logic required to inject data or respond to UI events.

Components are flexible and lightweight. They can be nested, reused, and shared among projects. Components in Blazor were formerly referred to as Razor components.

ComponentOne by MESCIUS has [<span>tons of amazing UI components</span>](https://developer.mescius.com/componentone/blazor-ui-controls "https://developer.mescius.com/componentone/blazor-ui-controls") for building fast and modern web applications using Blazor. They use the C# programming language to build native UI controls for Blazor.

ComponentOne UI components are reusable, work on all platforms, and support .NET 8, .NET 6, .NET Core 3.1, and Blazor WebAssembly. Check out the [<span>demos</span>](https://developer.mescius.com/componentone/demos/blazor/blazorexplorer/ "https://developer.mescius.com/componentone/demos/blazor/blazorexplorer/") to see each control in action.

Some of the ComponentOne UI controls for building Blazor applications include:

1.  **FlexGrid:** A fast data grid that enables typical data grid features such as tabular data editing, sorting, filtering, and grouping.
2.  **FlexChart:** A chart component that supports all common 2D chart types like bar, area, line, pie, and scatters.
3.  **DataFilter:** A separate, side-bar filtering control that lets users quickly apply multiple filters to a data view, such as FlexGrid or ListView.
4.  **Inputs:** Fill the toolbox gap with essential input controls such as AutoComplete, CheckBox, ComboBox, Masked TextBox, NumericBox, and more.
5.  **Calendar:** This lets you display multiple adjacent months in a single calendar view.
6.  **ListView:** Provides users with a list of items for selection.
7.  **TreeView:** Display data-bound items in a hierarchical tree with node expansion.
8.  **Tooltip:** This enables you to display simple text or any HTML content in a lightweight tooltip.
9.  **Window:** Allows you to display modal and modeless windows that can be resized, dragged, and closed with C1Window.

![ComponentOne Blazor Edition](//cdn.mescius.io/umb/media/hvibk3jr/c1-blazor.png?rmode=max&width=529&height=403)

ComponentOne Blazor Edition

## Electron.NET for building Desktop Apps with Blazor

Electron is a framework that supports the development of desktop applications using web technologies such as Blazor, the Chromium rendering engine, and the Node.js runtime. Supported operating systems include Windows, macOS, and Linux. It leverages familiar standards such as HTML, CSS, and JavaScript.

[Electron.NET](http://electron.net/ "http://Electron.NET") allows .NET developers to invoke native Electron APIs using C# and Blazor. You can read more about it here: [Building Blazor Desktop Apps with Electron.NET](https://developer.mescius.com/blogs/building-blazor-desktop-apps-with-electron-dot-net "https://developer.mescius.com/blogs/building-blazor-desktop-apps-with-electron-dot-net").

## Why Develop with Blazor

Web apps built with Blazor can execute C# code directly in a browser using WebAssembly. This is possible because Blazor itself is a .NET application running on WebAssembly. It can also run client logic on servers as it uses SignalR. SignalR is a real-time messaging framework that ensures efficient communication with servers.

One of the advanced features of Blazor is its ability to invoke JavaScript functions from .NET methods and .NET methods from JavaScript functions. This ability is called JavaScript interoperability (JS interop). It gives you the flexibility of using the large amount of JavaScript libraries that exist for client-side UIs, while writing your logic in C#.

Blazor was built on and uses open web standards without plugins or [code transpilation](https://www.stevefenton.co.uk/2012/11/compiling-vs-transpiling/#:~:text=Transpiling%20is%20a%20specific%20term%20for%20taking%20source,bodies%20are%20transformed%20by%20the%20compiler%20into%20IL. "https://www.stevefenton.co.uk/2012/11/compiling-vs-transpiling/#:~:text=Transpiling%20is%20a%20specific%20term%20for%20taking%20source,bodies%20are%20transformed%20by%20the%20compiler%20into%20IL."). It is universally applicable and works flawlessly in all modern web browsers, including those on mobile devices.

Since its initial release in 2018, the Blazor community has grown massively, and so has its number of tools.

## Summary

In this article, we explored some of the best of Blazor’s Visual Studio Extensions that make building applications less stressful and more efficient. We also explored some Blazor Components that you can easily use while building applications. Using third-party UI controls, like ComponentOne, in Blazor applications significantly shortens the development time of any project.