Summary
NetCoreApplicationTemplate 2.5.0 is a backward-compatible minor release focused on production-oriented EF Core diagnostics, Kubernetes deployment hardening, and dependency/tooling maintenance.
This release introduces explicit configuration controls for optional EF Core diagnostics while keeping normal EF Core logging efficient by default. It also strengthens the Kubernetes deployment example and refreshes observability, SQLite runtime, and GitHub Actions dependencies.
Highlights
Configurable EF Core Diagnostics
NCAT now exposes optional EF Core diagnostics under:
{
"ProjectTemplate": {
"DataAccess": {
"Diagnostics": {
"EnableDetailedErrors": false,
"EnableEfCoreTraceBridge": false
}
}
}
}Both settings default to false.
EnableDetailedErrorsenables EF CoreEnableDetailedErrors()when deeper property-level diagnostic information is needed.EnableEfCoreTraceBridgeenables EF Core'sLogTo(...)stream and forwards it throughILogger<ApplicationDbContext>atTracelevel.
Standard EF Core Microsoft.Extensions.Logging integration remains available without enabling either option.
Sensitive-data logging remains disabled. Enabling detailed errors or the trace bridge does not implicitly enable EnableSensitiveDataLogging().
The same diagnostic configuration is applied consistently to both scoped ApplicationDbContext instances and contexts created through IDbContextFactory<ApplicationDbContext>.
Save Pipeline Behavior Preserved
The existing ApplicationSaveChangesInterceptor remains active regardless of the optional diagnostic settings.
Disabling diagnostics therefore does not disable or alter the existing persistence pipeline, including auditing, canonicalization, mutation manifests, and related save lifecycle behavior.
Kubernetes Deployment Hardening
The Kubernetes deployment example has been strengthened with additional production-oriented defaults:
RuntimeDefaultseccomp profile- Non-root execution using application-specific UID/GID
10001 - All Linux capabilities dropped
- Read-only root filesystem
- Explicit CPU and memory requests and limits
- Automatic Kubernetes service-account token mounting disabled
- Writable application data and logging volumes retained
imagePullPolicy: Always- Container image updated to the version-pinned
2.5.0release
These changes reduce unnecessary container privileges while retaining the runtime capabilities required by the sample application.
Dependency and Tooling Updates
This release also refreshes several runtime and development dependencies, including:
- OpenTelemetry ASP.NET Core instrumentation
1.17.0 - OpenTelemetry HTTP instrumentation
1.17.0 SQLitePCLRaw.bundle_e_sqlite33.0.4- GitHub Actions checkout and .NET setup tooling
- GitHub CodeQL
- OpenSSF Scorecard
- Zizmor workflow security analysis
- Docker registry authentication tooling
NuGet dependency lock files have been refreshed to reflect the updated dependency graph.
Compatibility
Version 2.5.0 remains within the stable NCAT 2.x line.
There are no changes to:
- NuGet package ID:
NetCoreApplicationTemplate - Template short name:
netcoreapp-template - Internal template identity
- Template group identity
- Supported template options
Existing projects generated with earlier NCAT releases are not modified automatically.
Applications that do not configure the new EF Core diagnostics options retain the normal EF Core logging path without additional detailed-error or LogTo(...) diagnostic overhead.
Install
Install the template from NuGet:
dotnet new install NetCoreApplicationTemplate::2.5.0Generate a new application:
dotnet new netcoreapp-template -n ContosoSecurityPortalResources
- NuGet: https://www.nuget.org/packages/NetCoreApplicationTemplate
- Documentation: https://cdcavell.github.io/NetCoreApplicationTemplate/
- Repository: https://github.com/cdcavell/NetCoreApplicationTemplate
- Production Deployment Checklist: https://cdcavell.github.io/NetCoreApplicationTemplate/articles/production-deployment-checklist.html
- EF Core Diagnostics: https://cdcavell.github.io/NetCoreApplicationTemplate/articles/ef-core-diagnostics.html
- Zenodo Concept DOI: https://doi.org/10.5281/zenodo.20373042