Bolero Simple Template
This template can be used as a base to create a Bolero application.
To learn more, you can check the documentation.
To get started, you need the following installed:
- .NET Core SDK 2.1.403 or newer. Download it here.
Creating a project based on this template
To create a project based on this template, first install the template to your local dotnet:
dotnet new -i Bolero.Templates
Then, you can create a project like so:
dotnet new bolero-app -o YourAppName
This will create a project in a new folder named
You can use the following options to customize the project being created:
true, the created project is a minimal application skeleton with empty content.
false(the default), the created project includes Bolero features such as routed pages, HTML templates and remoting.
true(the default), the solution includes a
Serverproject, which is an ASP.NET Core server that hosts the application.
false, the solution only contains the
Clientproject that is compiled to WebAssembly.
This is ignored if
minimal=false, because the full-fledged project needs the server side for remoting.
Enable hot reloading for HTML templates.
The default is
This is ignored if
server=false, because hot reloading requires a server side.
Using this template
Visual Studio Code or Visual Studio is recommended to edit this project.
To compile the project, you can run:
To run it:
dotnet run -p src/YourAppName.Server # Or if you created the project with --minimal=true --server=false: dotnet run -p src/YourAppName.Client
src/YourAppName.Clientis the project that gets compiled to WebAssembly, and contains your client-side code.
Startup.fssets up Blazor to get the application started.
Main.fscontains the main body of the page.
src/YourAppName.Serveris the host ASP.NET Core application, and contains your server-side code.
Learn more about Bolero
To learn more about Bolero, you can check the documentation.