VijayAnand.BlazorTemplates
8.0.0
Prefix Reserved
dotnet new install VijayAnand.BlazorTemplates::8.0.0
Blazor Hybrid Windows Forms and WPF Project Templates
A project template for hosting the Blazor component in the Windows Forms and WPF desktop application.
To install the template package:
dotnet new install VijayAnand.BlazorTemplates
To update the template package:
dotnet new update --check-only
dotnet new update
To make use of the template:
By default, this creates a solution that targets .NET 10, the latest stable release channel.
For WinForms:
dotnet new winforms-blazor
For WPF:
dotnet new wpf-blazor
To target .NET 8, .NET 9, or .NET 11 (Preview), pass the explicit value (net8.0 / net9.0 / net11.0) to the Framework (--framework | -f) parameter, examples shown below.
.NET 8:
dotnet new winforms-blazor -f net8.0
dotnet new wpf-blazor -f net8.0
.NET 9:
dotnet new winforms-blazor -f net9.0
dotnet new wpf-blazor -f net9.0
.NET 11 Preview:
dotnet new winforms-blazor -f net11.0
dotnet new wpf-blazor -f net11.0
Optionally, to abstract Razor components as a separate Razor Class Library (RCL), pass the below parameter while creating the project:
-rcl | --razor-class-library - Default value is false
For WinForms:
dotnet new winforms-blazor -rcl
For WPF:
dotnet new wpf-blazor -rcl
Optionally, to make use of NuGet Central Package Management (CPM) feature, pass the below parameter while creating the project (Supported from v3.5.0 onwards):
-cpm | --central-pkg-mgmt - Default value is false
For WinForms:
dotnet new winforms-blazor -cpm
For WPF:
dotnet new wpf-blazor -cpm
Has support for Item Templates too:
- Windows Form with BlazorWebView
- Named as
winforms-bwv
- Named as
- WPF Window with BlazorWebView
- Named as
wpf-bwv
- Named as
Both of these templates require a parameter:
-n|--name- The Name of the Item to create.
Note:
Make sure the project dependencies are restored before creating a new item from these templates.
dotnet new winforms-bwv -n MyForm
dotnet new wpf-bwv -n MyWindow
To uninstall the template package:
dotnet new uninstall VijayAnand.BlazorTemplates
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.0 | 62 | 4/8/2026 |
| 7.0.0 | 141 | 11/20/2025 |
| 6.7.0 | 77 | 10/18/2025 |
| 6.6.0 | 106 | 9/15/2025 |
| 6.5.0 | 96 | 8/15/2025 |
| 6.4.0 | 104 | 7/22/2025 |
| 6.3.0 | 77 | 6/20/2025 |
| 6.2.0 | 126 | 5/21/2025 |
| 6.1.0 | 114 | 5/2/2025 |
| 6.0.0 | 167 | 3/19/2025 |
| 5.0.0 | 197 | 11/21/2024 |
| 4.5.0 | 170 | 10/20/2024 |
| 4.4.0 | 130 | 9/17/2024 |
| 4.3.0 | 181 | 8/20/2024 |
| 4.2.0 | 161 | 6/24/2024 |
| 4.1.0 | 170 | 5/28/2024 |
| 4.0.0 | 1,076 | 2/15/2024 |
| 3.6.1 | 821 | 1/18/2024 |
| 3.6.0 | 336 | 1/11/2024 |
| 3.5.0 | 1,635 | 11/14/2023 |
Join me on Developer Thoughts (https://egvijayanand.in/), an exclusive blog for articles on .NET MAUI and Blazor.
What's new in ver. 8.0.0:
-------------------------
Support for creating Blazor Hybrid Window Desktop projects on .NET 11 Previews.
For this, have introduced an additional option to the framework parameter - net11.0
Note: The default value for the framework parameter is net10.0, meaning that to create a project for .NET 11, you must explicitly pass the value net11.0.
dotnet new winforms-blazor -o MyApp -f net11.0
dotnet new wpf-blazor -o MyApp -f net11.0
v7.0.0:
1. Templates updated to support .NET 10 GA.
2. The default Framework value is now set to net10.0 to natively support .NET 10 (LTS).
dotnet new winforms-blazor -o MyApp
dotnet new wpf-blazor -o MyApp
When creating a .NET 8 or 9 project, an explicit value for the Framework parameter is required.
dotnet new winforms-blazor -o MyApp -f net9.0
dotnet new wpf-blazor -o MyApp -f net9.0
3. By default, the solution file is created in the SLNX format.
To work with the classic SLN format, override the default value.
dotnet new winforms-blazor -o MyApp -slnx:false
dotnet new wpf-blazor -o MyApp -slnx:false
v6.7.0:
Templates updated to support .NET 10 RC2.
Note: The WPF Blazor Hybrid project targeting .NET 10 no longer supports Windows 7 as a platform target and has been updated to require Windows 10 version 1809 or higher.
v6.6.0:
Templates updated to support .NET 10 RC1.
v6.5.0:
Templates updated to support .NET 10 Preview 7.
v6.4.0:
Templates updated to support .NET 10 Preview 6.
v6.3.0
Templates updated to support .NET 10 Preview 5.
v6.2.0:
Templates updated to support .NET 10 Preview 4.
v6.1.0
Templates updated to support .NET 10 Preview 3.
v6.0.0:
Support for creating .NET Blazor Hybrid Window Desktop projects on .NET 10 Previews.
For this, have introduced an additional option to the framework parameter - net10.0
Note: The default value for the framework parameter remains as net9.0, which means to create a project for .NET 10, an explicit value of net10.0 is to be passed.
dotnet new winforms-blazor -o MyApp -f net10.0
dotnet new wpf-blazor -o MyApp -f net10.0
v5.0.0:
Templates updated to support .NET 9 Stable channel release.
The default value for the Framework parameter is now set to net9.0
So by default, the project command generates a .NET 9 project.
dotnet new winforms-blazor -o MyApp
dotnet new wpf-blazor -o MyApp
To create a .NET 8 project, explicitly pass the value for the Framework parameter.
dotnet new winforms-blazor -o MyApp -f net8.0
dotnet new wpf-blazor -o MyApp -f net8.0
Removed out-of-support versions (.NET 6 and 7).
v4.5.0:
Templates updated to support .NET 9 RC2 release.
v4.4.0:
1. Templates updated to support .NET 9 RC1 release.
2. Introduced an option to add a reference to the CommunityToolkit.Mvvm NuGet package to work with MVVM.
-imt | --include-mvvm-toolkit - Default value is false
dotnet new winforms-blazor -o MyApp -imt
dotnet new wpf-blazor -o MyApp -imt
v4.3.0:
1. Templates updated to support .NET 9 Preview 7 and the latest .NET 8 release.
2. Introduced an option to support the XML-based solution file (slnx) format.
This would be an explicit option since the SLNX feature is currently in the preview stage and is only supported on VS2022.
-slnx | --use-slnx - Default value is false
dotnet new winforms-blazor -o MyApp -slnx
dotnet new wpf-blazor -o MyApp -slnx
v4.2.0:
1. Introduced using the NuGet CPM feature from within Visual Studio IDE.
2. Templates updated to support .NET 9 Preview 5 and latest .NET 8 release.
v4.1.0:
Templates updated to support .NET 9 Preview 4 and latest .NET 8 release.
v4.0.0:
1. Support for creating .NET Blazor Hybrid projects on .NET 9 Previews.
For this, have introduced an additional option to the framework parameter - net9.0
Note: The default value for the framework parameter remains as net8.0, which means to create a project for .NET 9, an explicit value of net9.0 is to be passed.
dotnet new winforms-blazor -o MyApp -f net9.0
dotnet new wpf-blazor -o MyApp -f net9.0
2. WPF Blazor namespace updated to URI based.
v3.6.1:
Updated the WinForms and WPF Blazor hybrid NuGet package reference to .NET MAUI 8 SR1 (8.0.6)
For more details, check this article:
https://egvijayanand.in/2024/01/18/dotnet-maui-8-service-release-1/
v3.6.0:
Source file namespace for BlazorWebView item templates automatically resolved from root namespace.
v3.5.0:
Templates updated for .NET 8 RTM.
Preview feature is now stable.
Note: For now, the CPM feature is only supported on CLI.
v3.5.0-preview.1:
Introduced an option for NuGet Central Package Management in CLI project templates.
-cpm | --central-pkg-mgmt - The default value is false.
dotnet new winforms-blazor -o MyApp -cpm
dotnet new wpf-blazor -o MyApp -cpm
v3.4.0
Templates updated for .NET 8 RC2.
v3.3.0:
Templates updated for .NET 8 RC1.
The default value for the Framework parameter (--framework / -f) is now updated as net8.0
v3.2.4:
Templates updated for .NET 8 Preview 7.
v3.2.3:
Templates updated for .NET 8 Preview 6.
v3.2.2:
Templates updated for .NET 8 Preview 5.
v3.2.1:
Templates updated for .NET 8 Preview 4.
v3.2.0:
All the preview features have reached stable.
Templates updated for .NET 8 Preview 3.
Item template for the following:
Windows Form with BlazorWebView:
dotnet new winforms-bwv -n MyForm -na BlazorApp
WPF Window with BlazorWebView:
dotnet new wpf-bwv -n MyWindow -na BlazorApp
Note:
Ensure the project dependencies are restored before creating Item from these templates.
While working with .NET 7 or higher SDK, the namespace parameter in short notation needs to be passed as -p:na (i.e., it needs to be prefixed with -p:).
v3.2.0-preview.2:
An option to abstract the Razor components as a separate Razor class library.
-rcl | --razor-class-library - Default value is false
dotnet new winforms-blazor -n MyApp -rcl
(or)
dotnet new winforms-blazor --name MyApp --razor-class-library
dotnet new wpf-blazor -n MyApp -rcl
(or)
dotnet new wpf-blazor --name MyApp --razor-class-library
v3.2.0-preview.1:
Template restructured to follow the same sample as other App Models.
v3.1.0:
1. Added the open-iconic artifacts to the solution
2. While targeting .NET 8, the StartPath property is set to load a Razor component other than the one defined with default route address of '/'
v3.0.3:
1. Added the option to allow for restore/build action on Windows projects on non-Windows platforms.
-ewt | --enable-windows-targeting
2. In Windows Forms solution, the Router component is renamed as Main.razor for better interop with other AppModels.
dotnet new winforms-blazor -ewt
dotnet new wpf-blazor -ewt
v3.0.2:
Added the option to skip creating a solution file.
-nsf | --no-solution-file - Default value is false
dotnet new winforms-blazor -nsf
dotnet new wpf-blazor -nsf
v3.0.1:
Templates updated for .NET 8 Preview 2.
v3.0.0:
Templates updated for .NET 8 Preview 1.
Supported values for target framework parameter, can be specified with --framework / -f
net6.0
net7.0 (the default value)
net8.0
Examples:
dotnet new winforms-blazor -f net8.0 -o BlazorWinForms1
dotnet new wpf-blazor -f net8.0 -o BlazorWpf1
v2.2.0:
Templates updated for .NET 7 service release.
The Blazor hybrid package version is updated as a wildcard so that the latest stable version will be pulled from the NuGet repository.
.NET 7 - 7.0.*
.NET 6 - 6.0.*
v2.1.1:
A little housekeeping to improve the reliability of the templates.
v2.1.0:
Templates updated for .NET 7 GA release.
Blazor desktop templates for Windows Forms and WPF.
Currently targeting .NET 6 / 7 and the corresponding .NET MAUI release.
A parameter named framework has been introduced that takes either net6.0 or net7.0 as its options (with net7.0 being the default value).
dotnet new winforms-blazor --framework net6.0
dotnet new winforms-blazor -f net7.0
dotnet new wpf-blazor --framework net6.0
dotnet new wpf-blazor -f net7.0
Unified template now also available as a VS extension.
https://marketplace.visualstudio.com/items?itemName=egvijayanand.blazor-desktop-templates
Take a look at this Blazor article for working with these templates:
https://egvijayanand.in/2021/11/13/net-maui-blazor/