TechsBCN.Platform.Setup 0.0.36

dotnet add package TechsBCN.Platform.Setup --version 0.0.36
                    
NuGet\Install-Package TechsBCN.Platform.Setup -Version 0.0.36
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TechsBCN.Platform.Setup" Version="0.0.36" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TechsBCN.Platform.Setup" Version="0.0.36" />
                    
Directory.Packages.props
<PackageReference Include="TechsBCN.Platform.Setup" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TechsBCN.Platform.Setup --version 0.0.36
                    
#r "nuget: TechsBCN.Platform.Setup, 0.0.36"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TechsBCN.Platform.Setup@0.0.36
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TechsBCN.Platform.Setup&version=0.0.36
                    
Install as a Cake Addin
#tool nuget:?package=TechsBCN.Platform.Setup&version=0.0.36
                    
Install as a Cake Tool

TechsBCN.Platform.Setup

TechsBCN.Platform.Setup Es la capa de configuración de arranque de Platform. Su objetivo es centralizar la carga de configuración y las migraciones de base de datos para que el Program.cs del proyecto se mantenga limpio y no tenga que gestionar estos detalles directamente. Los proyectos no deben reimplementar lo que Platform ya proporciona aquí.

Depende de TechsBCN.Platform.Infrastructure y TechsBCN.Platform.Application.

Estructura

Setup/
├── AppSettingsSetup.cs
└── ApplyMigrations.cs

AppSettingsSetup

Extensión de IConfigurationBuilder que carga múltiples ficheros appsettings en un orden fijo. Su objetivo es que cada capa pueda tener su propio fichero de configuración sin que el proyecto tenga que registrarlos uno a uno. Se activa en Program.cs antes de configurar servicios:

builder.Configuration.AddTechsBcnAppConfiguration(args, builder.Environment.EnvironmentName);

Los ficheros se cargan en este orden — los que van después sobreescriben a los anteriores. Los ficheros *.local.json son los más específicos del entorno local y se ignoran en el repositorio:

appsettings.json
appsettings.{Environment}.json
appsettings.local.json
appsettings.Application.json
appsettings.Application.{Environment}.json
appsettings.Application.local.json
appsettings.Infrastructure.json
appsettings.Infrastructure.{Environment}.json
appsettings.Infrastructure.local.json
appsettings.Persistence.json
appsettings.Persistence.{Environment}.json
appsettings.Persistence.local.json
appsettings.Infrastructure.Persistence.json
appsettings.Infrastructure.Persistence.{Environment}.json
appsettings.Infrastructure.Persistence.local.json
Variables de entorno

Los parámetros de los ficheros que no tienen sufijo de entorno se inicializan a una cadena de texto vacía cuando no se conoce el valor por defecto. Los *.Production.json contienen los marcadores $(variable) que el pipeline sustituye en despliegue. Un par clave-valor que sea igual en local y en producción no debe repetirse en el fichero *.Production.json.

Las variables de entorno siempre tienen prioridad sobre cualquier fichero. Cuando un valor de configuración requerido no está presente, el proyecto debe lanzar MissingSetupException al arrancar:

var connectionString = configuration.GetConnectionString("MyProject")
    ?? throw new MissingSetupException("ConnectionStrings:MyProject not configured.");

ApplyMigrations

Extensión de IServiceCollection para aplicar las migraciones pendientes de EF Core al arrancar la aplicación. Su objetivo es encapsular esta inicialización en un método de extensión para que Program.cs no contenga lógica de configuración detallada:

builder.Services.ApplyMigrations<MyDbContext>();
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.0.36 60 9/11/2026
0.0.35 180 8/25/2026
0.0.34 88 8/25/2026
0.0.33 91 8/25/2026
0.0.32 161 7/31/2026
0.0.31 490 7/10/2026
0.0.30 308 6/30/2026
0.0.29 131 6/18/2026
0.0.27 121 6/12/2026
0.0.26 116 6/12/2026
0.0.25 119 6/4/2026
0.0.24 111 6/1/2026
0.0.23 107 6/1/2026
0.0.22 180 5/27/2026