Path A: new solution
01 Walkthrough 02 Templates reference Want to choose each feature? Use Path B: step by step.
Templates¶
bITdevKit provides .NET templates that create solutions and modules using the kit's architectural conventions.
The generated structure follows onion architecture and groups each module into separate layer projects.
Available templates¶
Templates package on NuGet.org
bITdevKit Solution¶
Short name: bdksolution
Creates a solution with an initial module and the project structure for a bITdevKit-based application.
bITdevKit Module¶
Short name: bdkmodule
Adds a module to an existing solution. The template creates separate application, domain, infrastructure, presentation, and test projects.
Generated module structure:
[ModuleName].Application.csproj[ModuleName].Domain.csproj[ModuleName].Infrastructure.csproj[ModuleName].Presentation.csproj[ModuleName].IntegrationTests.csproj[ModuleName].UnitTests.csproj
Install the templates¶
Prerequisite:
- .NET 10 SDK or later
Install from NuGet:
dotnet new install BridgingIT.DevKit.Templates
Verify installation:
dotnet new list
Check it
You should see entries for the bITdevKit Solution and bITdevKit Module templates.
Create a new solution¶
Use the solution template to scaffold a new application:
dotnet new bdksolution --SolutionName SolutionName --ModuleName Core --allow-scripts yes -o ./projects/SolutionName
Parameters:
--SolutionName: the name of the solution--ModuleName: the name of the initial module-o: output directory for the solution
Add a new module¶
Inside an existing solution, add another module with:
dotnet new bdkmodule --ModuleName ModuleName -o src/Modules/ModuleName --allow-scripts yes
Parameters:
--ModuleName: the name of the new module-o: output directory for the module
After generation, the template adds the new projects to the solution file automatically.
Manual follow-up after module creation¶
After adding a module, register it and add its configuration.
Register the new module in Program.cs:
builder.Services.AddModules(builder.Configuration, builder.Environment)
.WithModule<[ModuleName]Module>();
Add the module configuration in appsettings.json:
"Modules": {
"[ModuleName]": {
"Enabled": true,
"ConnectionStrings": {
"Default": "ConnectionStringHere"
}
}
}
Project structure¶
The solution template creates a structure like this:
Onboarding path¶
Use this sequence:
- 01Read the walkthrough
- 02Install templates
dotnet new install - 03Create a solution or module
dotnet new bdksolution - 04Continue to the docs
reference/
Update or uninstall¶
Update to the latest template version:
dotnet new uninstall BridgingIT.DevKit.Templates
dotnet new install BridgingIT.DevKit.Templates
Uninstall:
dotnet new uninstall BridgingIT.DevKit.Templates