Layers : Root
The Root templates generate the solution-level configuration files that apply across all projects in the generated solution. These files define editor conventions, Git settings, build properties, centralized package management, the solution structure, and a README.
.editorconfig
The .editorconfig file defines code style conventions for the entire solution. It enforces tab indentation with a width of 4, CRLF line endings without a final newline, and disables the IDE0290 diagnostic (primary constructor suggestion) for C# files.
.gitattributes
The .gitattributes file configures Git line ending normalization with text=auto for all files, ensuring consistent line endings across platforms. It includes commented-out sections for custom diff/merge behavior for specific file types (solution files, project files, images, and document formats).
.gitignore
The .gitignore file is a standard Visual Studio .gitignore that excludes user-specific files, build outputs, temporary files, cache directories, test results, and other generated artifacts from version control. It covers scenarios for Visual Studio, MonoDevelop/Xamarin, MSTest, NUnit, and common .NET project structures.
Directory.Build.props
Directory.Build.props file defines MSBuild properties applied to all projects in the solution :
- TargetFramework : Set to
net10.0for all projects. - ImplicitUsings : Disabled (
false), requiring explicit using statements or global usings files. - Nullable : Enabled (
enable), enforcing nullable reference type annotations. - NoWarn : Suppresses the
NETSDK1187warning.
Directory.Packages.props
Directory.Packages.props file enables centralized package version management (ManagePackageVersionsCentrally) for the entire solution. The generator populates the ItemGroup with PackageVersion entries conditionally based on the bounded contexts' presentation options :
- Always included : FluentValidation, Microsoft.EntityFrameworkCore.Design, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.Localization, Microsoft.Extensions.Options.ConfigurationExtensions, Serilog, Serilog.Extensions.Hosting, Serilog.Extensions.Logging, Serilog.Settings.Configuration, Serilog.Sinks.Console, Serilog.Sinks.Debug.
- Blazor WebAssembly only : Microsoft.AspNetCore.Components.WebAssembly, Microsoft.AspNetCore.Components.WebAssembly.DevServer.
- Minimal API or Blazor WebAssembly : Microsoft.AspNetCore.OpenApi, Scalar.AspNetCore.
- Any presentation : Microsoft.Extensions.Http, Microsoft.Extensions.Http.Resilience, MudBlazor.
README.md
The README.md file contains a single heading with the solution name, serving as the entry point documentation for the generated repository.
Solution File (.slnx)
{{Solution.Name}}.slnx file is a XML-based solution file that organizes all projects into logical folders. The generator populates the structure :
- /0 - Solution Items/ : Contains
.editorconfig,Directory.Build.props,Directory.Packages.props, andREADME.md. - /1 - Domain/ : Contains one Domain project per bounded context.
- /2 - Application/ : Contains one Application project per bounded context.
- /3 - Infrastructure/ : Contains one Infrastructure.Persistence project per bounded context.
- /4 - Presentation/ : Contains BlazorServer, BlazorWebAssembly, and MinimalApi projects conditionally based on each bounded context's presentation options.
- /5 - Shared/ : Contains Shared.Core, Shared.Domain, Shared.Application, Shared.Infrastructure.Persistence, and conditionally Shared.Presentation, Shared.Presentation.Blazor, Shared.Presentation.BlazorServer, Shared.Presentation.BlazorWebAssembly, and Shared.Presentation.MinimalApi based on the presentation options used across bounded contexts.