BlazorHosted.Shared
1.0.0
dotnet add package BlazorHosted.Shared --version 1.0.0
NuGet\Install-Package BlazorHosted.Shared -Version 1.0.0
<PackageReference Include="BlazorHosted.Shared" Version="1.0.0" />
<PackageVersion Include="BlazorHosted.Shared" Version="1.0.0" />
<PackageReference Include="BlazorHosted.Shared" />
paket add BlazorHosted.Shared --version 1.0.0
#r "nuget: BlazorHosted.Shared, 1.0.0"
#:package BlazorHosted.Shared@1.0.0
#addin nuget:?package=BlazorHosted.Shared&version=1.0.0
#tool nuget:?package=BlazorHosted.Shared&version=1.0.0
BlazorHosted .NET 9 Template
This is a custom template for creating a Blazor WebAssembly (WASM) App hosted with ASP.NET Core, using the latest features of .NET 9.
π¦ Whatβs Included
This template scaffolds a solution with the following projects:
Client: The Blazor WebAssembly frontend.Server: The ASP.NET Core backend that serves the client app and hosts APIs.Shared: A shared class library for common models and DTOs.
π Getting Started
1. Install the Template
If not already installed, install the template globally:
dotnet new --install Blazorhosted.DevJojo
You can verify the installation using:
dotnet new --list | grep blazorhosted
2. Create a New Project
dotnet new blazorhosted -n MyApp
cd MyApp
This will scaffold:
MyApp/
βββ MyApp.Client/
βββ MyApp.Server/
βββ MyApp.Shared/
βββ MyApp.sln
3. Run the App
From the root folder:
dotnet build
dotnet run --project Server
The app will be available at https://localhost:<PORT_CONFIGURED>
4. Development Workflow
- Modify Blazor components in
Client/Pages. - Add API controllers or endpoints in
Server/Controllers. - Share models or DTOs between client and server via the
Sharedproject.
βοΈ Customization Tips
- Use
appsettings.Development.jsonfor dev config. - Cookie Authentication has already been configured. All you need is your UI
- Database related items can be found in Infrastracture/Persistence
- Use dependency injection across all projects as needed
π οΈ Build & Publish
To publish the app:
dotnet publish Server -c Release -o ./publish
This bundles the Blazor client app and serves it from the ASP.NET Core backend.
π License
This template is open for personal or commercial use. Customize it freely.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net9.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 |
|---|