DrewBrasher.OrchardCore.Blazor 1.0.1

dotnet add package DrewBrasher.OrchardCore.Blazor --version 1.0.1
                    
NuGet\Install-Package DrewBrasher.OrchardCore.Blazor -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DrewBrasher.OrchardCore.Blazor" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DrewBrasher.OrchardCore.Blazor" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="DrewBrasher.OrchardCore.Blazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DrewBrasher.OrchardCore.Blazor --version 1.0.1
                    
#r "nuget: DrewBrasher.OrchardCore.Blazor, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DrewBrasher.OrchardCore.Blazor@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DrewBrasher.OrchardCore.Blazor&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=DrewBrasher.OrchardCore.Blazor&version=1.0.1
                    
Install as a Cake Tool

Blazor Module

Everything you need to include Blazor components inside the pages, MVC views, and Template Views of your Orchard Core Module.

NOTE: This currently only works with Themes that have Razor layouts like TheTheme. It does not work with Themes like the Blog or Agency Themes that use liquid layouts.

NuGet Package

NuGet Version

Usage

  1. Add a refference to the DrewBrasher.OrchardCore.Blazor project to your Orchard Core Module.

  2. Add DrewBrasher.OrchardCore.Blazor to the Dependencies of your Module's Manifest.cs file.

     Dependencies = [ "DrewBrasher.OrchardCore.Blazor" ]
    
  3. Add the tag helper to your _ViewImports.cshtml file:

     @addTagHelper *, DrewBrasher.OrchardCore.Blazor
    
  4. Add your component to a page or view:

    • If your component does not take any parameters you can add it with one line like this:

        <blazor-component type="typeof(DemoComponent)" render-mode="ServerPrerendered" />
      
    • If your component takes parameters you can add it with two lines like this:

        <enable-blazor-components render-mode="ServerPrerendered" />
        <component type="typeof(DemoComponent)" param-YourParam="YourValue" render-mode="ServerPrerendered" />
      
    • If your theme uses a Zone other than HeadMeta for rendering meta data, you can specify the zone like this:

        <blazor-component type="typeof(DemoComponent)" render-mode="ServerPrerendered" header-zone="YourHeadZoneHere" />
      

      or this:

        <enable-blazor-components render-mode="ServerPrerendered"  header-zone="YourHeadZoneHere" />
      

DrewBrasher.OrchardCore.Blazor

Everything you need to include Blazor components inside the pages, MVC views, and Template Views of your Orchard Core Module.

OCRazorModuleDemo

This is an Orchard Core CMS Module to demo and test this project. It has an MVC View and a Widget that both use the DemoComponent.

RazorDemo

This is a Razor Class Library with a DemoComponent to use for testing this project.

Contributing

If you would like to help out with this module, here are the steps to test it out:

  1. Clone this repository
  2. Setup OC with the default theme (TheTheme)
  3. Enable the OCRazorModuleDemo feature
  4. Go to this url to test: /OCRazorModuleDemo/Home/Index

Credits

Thank you to ApacheTech for the EnableBlazorComponentsTagHelper!

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.1 412 11/18/2025
1.0.0 690 11/13/2025

Fixed issue with missing partial views.