VijayAnand.Wpf.Blazor 4.0.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
This package has a SemVer 2.0.0 package version: 4.0.0+sha.755342d.
dotnet new install VijayAnand.Wpf.Blazor::4.0.0
This package contains a .NET Template Package you can call from the shell/command line.

A project template for hosting the Blazor component in the WPF desktop application.

To install the template:

dotnet new install VijayAnand.Wpf.Blazor

To make use of the template:

By default, this creates a solution that targets .NET 8.

dotnet new wpf-blazor

To target .NET 6 / .NET 7 / .NET 9, pass the corresponding value (net6.0 / net7.0 / net9.0) to the framework (--framework | -f) parameter, example shown below.

dotnet new wpf-blazor -f net7.0
dotnet new wpf-blazor -f net9.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

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

dotnet new wpf-blazor -cpm

Has support for Item Template too:

  • WPF Window with BlazorWebView
    • Named as wpf-bwv

It requires a parameter:

  • -n | --name - The Name of the Item to create

Note:

Ensure the project dependencies are restored before creating Item from these templates.

dotnet new wpf-bwv -n MyWindow
  • .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
4.0.0 925 2/15/2024
3.6.1 708 1/18/2024
3.6.0 212 1/11/2024
3.5.0 1,545 11/14/2023
3.5.0-preview.1 669 10/19/2023
3.4.0 235 10/12/2023
3.3.0 101 9/14/2023
3.2.4 91 8/14/2023
3.2.3 88 7/16/2023
3.2.2 81 6/14/2023
3.2.1 75 5/19/2023
3.2.0 94 4/12/2023
3.2.0-preview.2 67 4/4/2023
3.2.0-preview.1 72 4/1/2023
3.1.0 91 3/27/2023
3.0.3 84 3/25/2023
3.0.2 83 3/24/2023
3.0.1 90 3/15/2023
3.0.0 129 2/22/2023
2.2.0 1,836 12/16/2022
2.1.1 1,080 11/24/2022
2.1.0 1,042 11/10/2022
2.0.0 1,099 10/5/2022
1.2.0 1,262 6/14/2022
1.1.0 1,327 5/23/2022
1.0.19 1,244 5/12/2022
1.0.18 1,196 4/28/2022
1.0.17 1,142 4/18/2022
1.0.16 1,187 4/12/2022
1.0.15 1,169 3/18/2022
1.0.14 1,138 2/23/2022
1.0.13 1,217 2/17/2022
1.0.12 1,097 2/7/2022
1.0.11 1,081 12/17/2021
1.0.10 995 11/19/2021
1.0.9 1,010 11/12/2021
1.0.8 895 11/9/2021
1.0.7 1,002 10/15/2021
1.0.6 1,011 9/16/2021
1.0.5 1,685 8/17/2021
1.0.4 1,196 8/11/2021
1.0.3 1,652 7/15/2021
1.0.2 1,659 6/25/2021
1.0.1 1,113 6/23/2021
1.0.0 1,206 6/8/2021

Join me on Developer Thoughts (https://egvijayanand.in/), an exclusive blog for articles on .NET MAUI and Blazor.

What's new in ver. 4.0.0:
-------------------------
1. Support for creating .NET Blazor Hybrid project 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 wpf-blazor -o MyApp -f net9.0

2. WPF Blazor namespace updated to URI based.

v3.6.1:

Updated the 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 template 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 template.

-cpm | --central-pkg-mgmt - The default value is false.

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 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 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

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 wpf-blazor -nsf

v3.0.1:

Templates updated to support .NET 8 Preview 2.

v3.0.0:

Templates updated to support .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 wpf-blazor -f net8.0 -o BlazorWpf1

v2.2.0:

Template 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:

Template has been updated to support .NET 7 GA release.

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 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/