{"id":14986315,"url":"https://github.com/egvijayanand/blazor-project-templates","last_synced_at":"2025-08-11T16:12:51.883Z","repository":{"id":37891018,"uuid":"371280623","full_name":"egvijayanand/blazor-project-templates","owner":"egvijayanand","description":".NET Blazor Hybrid Windows Desktop project templates","archived":false,"fork":false,"pushed_at":"2025-07-22T14:29:55.000Z","size":15907,"stargazers_count":34,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-22T15:30:28.560Z","etag":null,"topics":["blazor","blazorwebview","client","csharp","desktop","dotnet","dotnet8","dotnet9","dotnetmaui","hybrid","modernization","mvvm","razor","templates","web","windows","windowsforms","winforms","wpf","xaml"],"latest_commit_sha":null,"homepage":"https://egvijayanand.in/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egvijayanand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["egvijayanand"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/egvijayanand","https://www.buymeacoffee.com/egvijayanand"]}},"created_at":"2021-05-27T07:13:59.000Z","updated_at":"2025-07-22T14:27:38.000Z","dependencies_parsed_at":"2024-06-24T05:27:33.184Z","dependency_job_id":"d7bd2c16-e87f-48c0-af89-04e6199ba403","html_url":"https://github.com/egvijayanand/blazor-project-templates","commit_stats":{"total_commits":145,"total_committers":1,"mean_commits":145.0,"dds":0.0,"last_synced_commit":"6023586ee85004bf85e190a4848ea1e2e4213861"},"previous_names":[],"tags_count":92,"template":false,"template_full_name":null,"purl":"pkg:github/egvijayanand/blazor-project-templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egvijayanand%2Fblazor-project-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egvijayanand%2Fblazor-project-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egvijayanand%2Fblazor-project-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egvijayanand%2Fblazor-project-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egvijayanand","download_url":"https://codeload.github.com/egvijayanand/blazor-project-templates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egvijayanand%2Fblazor-project-templates/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269917346,"owners_count":24496075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blazor","blazorwebview","client","csharp","desktop","dotnet","dotnet8","dotnet9","dotnetmaui","hybrid","modernization","mvvm","razor","templates","web","windows","windowsforms","winforms","wpf","xaml"],"created_at":"2024-09-24T14:12:41.494Z","updated_at":"2025-08-11T16:12:51.874Z","avatar_url":"https://github.com/egvijayanand.png","language":"HTML","funding_links":["https://github.com/sponsors/egvijayanand","https://paypal.me/egvijayanand","https://www.buymeacoffee.com/egvijayanand"],"categories":[],"sub_categories":[],"readme":"## Blazor Desktop Project Templates\n\n### Blazor desktop project templates for Windows Forms and WPF\n\n|App Model|Stable Channel|Preview Channel|\n|:---:|:---:|:---:|\n|[Unified Package](https://www.nuget.org/packages/VijayAnand.BlazorTemplates/)|[![Blazor NuGet Stable Package](https://badgen.net/nuget/v/VijayAnand.BlazorTemplates/?icon=nuget\u0026foo=bar)](https://www.nuget.org/packages/VijayAnand.BlazorTemplates/)\u003cbr /\u003e[![Blazor Desktop Templates - VS Marketplace](https://badgen.net/vs-marketplace/v/egvijayanand.blazor-desktop-templates?icon=visualstudio\u0026foo=bar)](https://marketplace.visualstudio.com/items?itemName=egvijayanand.blazor-desktop-templates)| - \u003c!--[![Blazor NuGet Preview Package](https://badgen.net/nuget/v/VijayAnand.BlazorTemplates/pre?icon=nuget\u0026foo=bar)](https://www.nuget.org/packages/VijayAnand.BlazorTemplates/absoluteLatest)--\u003e|\n|[Windows Forms](https://www.nuget.org/packages/VijayAnand.WindowsForms.Blazor/)|[![WinForms Blazor Stable Package](https://badgen.net/nuget/v/VijayAnand.WindowsForms.Blazor/?icon=nuget\u0026foo=bar)](https://www.nuget.org/packages/VijayAnand.WindowsForms.Blazor/)| - \u003c!--[![WinForms Blazor Preview Package](https://badgen.net/nuget/v/VijayAnand.WindowsForms.Blazor/pre?icon=nuget\u0026foo=bar)](https://www.nuget.org/packages/VijayAnand.WindowsForms.Blazor/absoluteLatest)--\u003e|\n|[WPF](https://www.nuget.org/packages/VijayAnand.Wpf.Blazor/)|[![WPF Blazor Stable Package](https://badgen.net/nuget/v/VijayAnand.Wpf.Blazor/?icon=nuget\u0026foo=bar)](https://www.nuget.org/packages/VijayAnand.Wpf.Blazor/)| - \u003c!--[![WPF Blazor Preview Package](https://badgen.net/nuget/v/VijayAnand.Wpf.Blazor/pre?icon=nuget\u0026foo=bar)](https://www.nuget.org/packages/VijayAnand.Wpf.Blazor/absoluteLatest)--\u003e|\n\nTemplates made available for working with **Blazor components in desktop applications such as Windows Forms and WPF**.\n\nAlso available in an unified template package.\n\nJoin me on [**Developer Thoughts**](https://egvijayanand.in/), an exclusive blog for .NET MAUI and Blazor, for articles on working with these templates and much more.\n\nNow published as Visual Studio 2022 Extension, can be downloaded from the [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=egvijayanand.blazor-desktop-templates) and then installed with VSIX installer or even an easy way, install and manage directly from within Visual Studio IDE itself (Extensions -\u003e Manage Extensions or `Alt + X + M` shortcut). To find this extension, search with the `blazorwebview` keyword. Refer to the below screenshot.\n\nThe Blazor Desktop Templates Pack VS extension (v4.3.0.0 or higher) is now supported on both **x64 and ARM64** installations of Visual Studio 2022. Happy coding!\n\n*Consequently, the minimum supported version of Visual Studio 2022 will be v17.6 or higher.*\n\n![Visual Studio – Manage Extensions (Blazor Desktop Templates in focus)](./images/vs-manage-extensions.png)\n\nFor CLI users, commands to install the project template:\n\nUnified Template:\n\n```shell\ndotnet new install VijayAnand.BlazorTemplates\n```\n\nCan also be installed separately.\n\n```shell\ndotnet new install VijayAnand.WindowsForms.Blazor\n```\n\n```shell\ndotnet new install VijayAnand.Wpf.Blazor\n```\n\nTo update the template package:\n\n```shell\ndotnet new update --check-only\n```\n```shell\ndotnet new update\n```\n\nAnd from [v4.3.0](https://www.nuget.org/packages/VijayAnand.BlazorTemplates/4.3.0) of the template package, support for XML-based solution file (slnx) format.\n\n* SLNX Solution File Format (Short notation: `-slnx`):\n\n  Introduces support for the new, simplified, and easily understandable XML-based solution file format.\n\n  This would be an explicit option since the SLNX feature is currently in the preview stage and is only supported on VS2022.\n\n  `-slnx` | `--use-slnx` - Default value is `false`.\n\n  ```shell\n  dotnet new winforms-blazor -o MyApp -slnx\n  ```\n\n  ```shell\n  dotnet new wpf-blazor -o MyApp -slnx\n  ```\n\nAnd from [v4.4.0](https://www.nuget.org/packages/VijayAnand.BlazorTemplates/4.4.0) of the template package, support for adding a reference to the MVVM toolkit.\n\n* Include MVVM Toolkit (Short notation: `-imt`):\n\n  Introduces an option to add a reference to the [CommunityToolkit.Mvvm](https://www.nuget.org/packages/CommunityToolkit.Mvvm) NuGet package to work with MVVM.\n\n  `-imt` | `--include-mvvm-toolkit` - Default value is `false`.\n\n  ```shell\n  dotnet new winforms-blazor -o MyApp -imt\n  ```\n\n  ```shell\n  dotnet new wpf-blazor -o MyApp -imt\n  ```\n\n#### Project names referenced by these templates:\n\nWindows Forms: **winforms-blazor**\n\nWPF: **wpf-blazor**\n\nSo, .NET CLI command to create a new project from your favorite terminal would be as follows:\n\nBy default, this creates a project that targets `.NET 9`.\n\nTo create projects targeting different supported/preview version of .NET, make use of the Framework parameter (`--framework` | `-f`) that takes `net8.0` / `net9.0` / `net10.0` as its options (with `net9.0` being the default value, if not specified).\n\nWinForms:\n\nBeing the default value, framework parameter is optional for `.NET 9`.\n\n```shell\ndotnet new winforms-blazor\n```\n\n```shell\ndotnet new winforms-blazor -f net8.0\n```\n\n.NET 10 Preview:\n\n```shell\ndotnet new winforms-blazor -f net10.0\n```\n\nWPF:\n\nBeing the default value, framework parameter is optional for `.NET 9`.\n\n```shell\ndotnet new wpf-blazor\n```\n\n```shell\ndotnet new wpf-blazor -f net8.0\n```\n\n.NET 10 Preview:\n\n```shell\ndotnet new wpf-blazor -f net10.0\n```\n\nOptionally, to abstract Razor components as a separate Razor Class Library (RCL), pass the below parameter while creating the project:\n\n`-rcl` | `--razor-class-library` - Default value is `false`\n\nFor WinForms:\n\n```shell\ndotnet new winforms-blazor -rcl\n```\n\nFor WPF:\n\n```shell\ndotnet new wpf-blazor -rcl\n```\n\nOptionally, to make use of NuGet Central Package Management (CPM) feature, pass the below parameter while creating the project (_Supported from v3.5.0 onwards_):\n\n`-cpm` | `--central-pkg-mgmt` - Default value is `false`\n\nFor WinForms:\n\n```shell\ndotnet new winforms-blazor -cpm\n```\n\nFor WPF:\n\n```shell\ndotnet new wpf-blazor -cpm\n```\n\nProject options can also be used in combination like `-rcl`, `-cpm`, and `-slnx`.\n\nHas support for Item Templates too:\n\n* Windows Form with BlazorWebView\n  - Named as `winforms-bwv`\n* WPF Window with BlazorWebView\n  - Named as `wpf-bwv`\n\nBoth of these templates require a parameter:\n\n* `-n` | `--name` - The Name of the Item to create\n\n\u003c!--\n* `-na` | `--namespace` - The Namespace for the Item to create\n--\u003e\n\nNote:\n\n*Make sure the project dependencies are restored before creating a new item from these templates.*\n\n\u003c!--\n*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:`).*\n--\u003e\n\n```shell\ndotnet new winforms-bwv -n MyForm\n```\n\n```shell\ndotnet new wpf-bwv -n MyWindow\n```\n\nTo uninstall the template package:\n\n```shell\ndotnet new uninstall VijayAnand.BlazorTemplates\n```\n\nTo run the project, it does depend on the WebView2 runtime, which can be downloaded from here:\n\nhttps://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section\n\nOr can easily be installed with [Maui Check](https://github.com/Redth/dotnet-maui-check) tool.\n\n#### Templates within Visual Studio\n\nAfter installing the CLI template, optionally, this can be made available in the `New Project` dialog within Visual Studio for an integrated experience.\n\n\u003e **Pro Tip:** Search/Filter with the **Blazor** keyword to quickly locate these template in the VS _Create Project_ dialog.\n\n![Blazor Desktop Project Templates within Visual Studio 2022](./images/blazor-desktop-templates.png)\n\n\u003c!--\nUsers on VS2019 (ver. 16.8+) need to enable the option as shown in the below screenshot (Tools -\u003e Options / `Alt + T + O`) and then restart the Visual Studio instance for this to take effect.\n\n_And in case of Visual Studio 2022, the option of listing the installed .NET CLI templates within IDE is enabled by default._\n\n![CLI Project Templates within Visual Studio 2019](./images/cli-templates-option-enable.png)\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegvijayanand%2Fblazor-project-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegvijayanand%2Fblazor-project-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegvijayanand%2Fblazor-project-templates/lists"}