Heroicsoft.NetForge.Components 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Heroicsoft.NetForge.Components --version 1.0.0
                    
NuGet\Install-Package Heroicsoft.NetForge.Components -Version 1.0.0
                    
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="Heroicsoft.NetForge.Components" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Heroicsoft.NetForge.Components" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Heroicsoft.NetForge.Components" />
                    
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 Heroicsoft.NetForge.Components --version 1.0.0
                    
#r "nuget: Heroicsoft.NetForge.Components, 1.0.0"
                    
#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 Heroicsoft.NetForge.Components@1.0.0
                    
#: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=Heroicsoft.NetForge.Components&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Heroicsoft.NetForge.Components&version=1.0.0
                    
Install as a Cake Tool

Heroicsoft.NetForge

Shared building blocks for the self-hosted MVC and Blazor apps. Authentication, result helpers, and the Hangfire dashboard filter are used by both. Heroicsoft.NetForge.Components is Blazor only: the shell, theme picker, toasts, and dialogs.

Packages

Package What it replaces
Heroicsoft.NetForge.Abstractions AuthProvider, IUserContextService, BootswatchThemes, AppVersion, DatabaseProviders, setup status, nav models
Heroicsoft.NetForge.Results ResultExtensions (To<T>, GetDisplayMessage)
Heroicsoft.NetForge.Authentication Identity / Keycloak / None registration, Keycloak back-channel and role mapping, /auth/login, setup redirect
Heroicsoft.NetForge.Components Shell, theme picker, toasts, confirm/prompt dialogs, pager, empty states, router
Heroicsoft.NetForge.Hangfire Administrator-only Hangfire dashboard filter

New app

<PackageReference Include="Heroicsoft.NetForge.Components" Version="1.0.0" />
<PackageReference Include="Heroicsoft.NetForge.Authentication" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.12" />

Restore Bootswatch, Bootstrap, and Bootstrap Icons into wwwroot/lib (see templates/libman.json). The theme picker swaps those stylesheets at runtime; the library does not embed them.

builder.Services.AddCascadingAuthenticationState();
builder.Services.AddNetForgeComponents(ui =>
{
    ui.ThemeStorageKey = "myapp.theme";
});
builder.Services.Configure<ForgeShellOptions>(shell =>
{
    shell.Brand = "My App";
    shell.SearchUrlFormat = "/?q={0}";
    shell.Sections.Add(new ForgeNavSection
    {
        Items =
        [
            new ForgeNavItem { Title = "Home", Href = "/", Icon = "bi-house", MatchAll = true },
        ],
    });
});

var auth = builder.Services.AddNetForgeAuthentication<ApplicationUser, ApplicationRole, ApplicationDbContext>(
    builder.Configuration);

var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.UseNetForgeSetupGate(); // after registering ISetupStatus, if the app has a wizard
app.MapControllers();
if (auth == AuthProvider.Identity)
{
    app.MapRazorPages();
}

Components/App.razor:

<ForgeHostPage Title="My App" IconHref="img/Icon.png" AppStylesheet="@Assets["css/site.css"]">
    <ForgeRouter AppAssembly="typeof(Program).Assembly" NotFoundPage="typeof(Pages.NotFound)" />
</ForgeHostPage>

Authentication:Provider is Identity, Keycloak, or None, with the same Authentication:Keycloak keys the other apps already use. None signs every request in as a single administrator and must not be exposed beyond the machine running it.

Pages inject ToastService, DialogService, and SidebarRefresh instead of copying those types. ShellLayout is the default layout: set ForgeShellOptions.Sections for a static menu, or register IShellNavigation when the sidebar is loaded from data and call SidebarRefresh.NotifyChanged() after a write.

Hangfire hosts add Heroicsoft.NetForge.Hangfire and pass new AdministratorDashboardAuthorizationFilter() in the dashboard options.

MVC hosts keep their own /auth controller and IUserContextService. Pass IncludeAuthController = false, RegisterUserContext = false, and Identity.UseRelaxedPasswordPolicy = false. Keycloak behind a reverse proxy also sets RequireHttpsMetadata = false, correlation cookies to SameSite=None / Secure=Always, and RedirectBrowserToPublicAuthority = true. Set AccessDeniedPath to /Home/AccessDenied and RemoteFailurePath to /Home/Error. When Authentication:Keycloak:PublicOrigin is set, post-logout redirects to {PublicOrigin}/signout-callback-oidc.

Blazor hosts leave those flags at their defaults and pass the app's existing theme storage key (linkstash.theme, and the same pattern in the other apps) so a stored theme survives the switch to window.netForge.

Left in the app

Domain pages, EF contexts, and user-directory services stay in the app. IUserInfoService and the Keycloak admin client differ once they start returning each app's own user model, so they were not pulled into the library.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (9)

Showing the top 5 NuGet packages that depend on Heroicsoft.NetForge.Components:

Package Downloads
Heroicsoft.NetForge.Components.Bootstrap

Bootstrap and Bootswatch implementation of the NetForge Blazor shell, theme picker, toasts, dialogs, paging, and status pages. Includes the Bootstrap shared menu. For apps that already use Bootstrap; apps with their own styling use Heroicsoft.NetForge.Components.

LogVue

An in-process Blazor dashboard for viewing, querying and deleting an ASP.NET Core application's logs.

IdentityNexus

A Blazor UI for administering ASP.NET Core Identity users and roles.

PageKrafter.Components

Drag-and-drop page and email builder for Blazor Server, built on PageKrafter.Core.

Localize.Components

Language switch for a NetForge shell. Uses enabled database languages when a Localize database is registered, and shipped language packs otherwise. No admin UI.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.1 75 12/1/2026
1.3.0 129 12/1/2026
1.2.9 174 11/22/2026
1.2.8 249 11/20/2026
1.2.7.1 116 11/20/2026
1.2.7 111 11/20/2026
1.2.6 211 11/18/2026
1.2.5 162 11/14/2026
1.2.4 135 11/11/2026
1.2.3 299 11/5/2026
1.2.2 157 11/4/2026
1.2.1 130 11/3/2026
1.2.0 187 10/31/2026
1.1.1 143 10/27/2026
1.1.0 146 10/26/2026
1.0.3 165 10/23/2026
1.0.2 117 10/16/2026
1.0.1 123 10/16/2026
1.0.0 123 10/16/2026 1.0.0 is deprecated because it is no longer maintained.