Saltar al contenido principal
ProductosHerramientas de escritorioTASTECADRevisión de planosTASTEFILESGestión de archivosTASTEFTPTransferencia de archivosTASTESSHEspacio de trabajo remotoTASTEZIPCompresión y extracciónTASTEWINMGestión de archivosHerramientas para desarrolladoresTASTECODEEntorno de desarrollo integrado para RustTASTESTUDIOEntorno integrado de desarrollo y pruebasTASTEETLIntegración de datos (ETL)ServidoresTASTEREMOTEServidor de escritorio remotoTASTEGEOServidor geoespacialTASTEMAILEspacio de trabajo de correoInversiónTASTESTOCKAplicación de escritorio de trading automático de accionesEmpezarDescargasDocumentaciónComprarTodos los productos
Marketplace
Noticias
TecnologíaNoticiasNoticias de desarrollo de hoyDocumentaciónLenguajes de programaciónRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFrameworks web frontendNext.jsReactVue.js · NuxtSvelteKitAngularFrameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFrameworks de apps y escritorioTauriFlutterReact NativeElectronAlgoritmosFundamentos de algoritmosAlgoritmos esencialesAlgoritmos avanzadosAlgoritmos prácticos
ComunidadProyectosRegistros de desarrolloPromptsProblemas con herramientas de IAEscaparateGuía de la comunidad
ColaboraTransferencia técnicaDesarrollo de sitio webDesarrollo de app de escritorioCanal de lanzamiento y pagosSocio de ventasContacto
ServiciosEscritorio remotoPaquetes de instalación a medida
TASTEDEV
Productos

Herramientas de escritorio

TASTECADAbre planos complejos con ligerezaTASTEFILESSolo los archivos que necesitas, lo más rápido posibleTASTEFTPEl camino más limpio para tus archivosTASTESSHEntre tu servidor y tú, una conexión más sólidaTASTEZIPComprime más rápido, descomprime más seguroTASTEWINMUn gestor de archivos de dos paneles pensado para el teclado

Herramientas para desarrolladores

TASTECODEEdita, compila, depura y prueba apps de Rust en una sola ventanaTASTESTUDIODe la edición a las pruebas remotas y las correcciones con IA aprobadasTASTEETLMueve datos viendo sus valores

Servidores

TASTEREMOTEUn escritorio remoto que funciona en tu propio servidorTASTEGEOUn servidor geoespacial compatible con GeoServer, reconstruido en RustTASTEMAILRecupera el control de tu correo

Inversión

TASTESTOCKTrading automático de acciones según las reglas que tú defines: cuándo y qué

Empezar

DescargasÚltimas versiones de cada productoDocsCómo usar cada productoComprarSuscripciones y licencias perpetuasTodos los productosTodos los productos de un vistazo
Todos los productos
MarketplaceNoticias
Tecnología

Noticias

Noticias de desarrollo de hoyAnuncios oficiales de lenguajes, frameworks, GitHub e IADocumentaciónGuías de lenguajes, frameworks y algoritmos

Lenguajes de programación

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Frameworks web frontendNext.jsReactVue.js · NuxtSvelteKitAngular
Frameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Frameworks de apps y escritorioTauriFlutterReact NativeElectron

Algoritmos

Fundamentos de algoritmosAnálisis de complejidad · Ordenamiento · Búsqueda · Estructuras de datos básicas · Árboles y montículosAlgoritmos esencialesRecorrido de grafos · Camino mínimo y árbol generador mínimo · Programación dinámica · Algoritmos voraces · Divide y vencerás · Backtracking (vuelta atrás)Algoritmos avanzadosAlgoritmos de cadenas · Matemáticas y teoría de números · Manipulación de bits · Árboles de segmentos · Union-FindAlgoritmos prácticosEstrategia para entrevistas de código · Caché LRU · Limitación de tasa · Hashing consistente
Toda la documentación de desarrollo
Comunidad
ProyectosDescubre creadores y su trabajoRegistros de desarrolloDecisiones y aprendizajesPromptsInstrucciones reutilizablesProblemas con herramientas de IAProblemas y alternativas de Claude, Codex, GeminiEscaparateResultados terminadosGuía de la comunidadCómo construimos en abierto
Colabora
Transferencia técnicaApps nativas con Rust y eguiDesarrollo de sitio web10 idiomas, cuentas, documentación y descargasDesarrollo de app de escritorioRust y egui, sin WebViewCanal de lanzamiento y pagosFirma, MSI, deb, rpm, AppImage, hashesSocio de ventasRecomiéndanos y gana el 30 %ContactoDesarrollo, alianzas e inversión
Servicios
Escritorio remotoAccede a tu ordenador desde el navegadorPaquetes de instalación a medidaSolo lo necesario, ajustes precargados
Comprar
ES
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Iniciar sesión
Iniciar sesión
TASTEDEV

De pequeñas herramientas a un mejor desarrollo.

support@tastedev.netApoyar a TASTEDEV
ProductosLínea de productosComprarDocsDescargasMarketplaceSoporte
ComunidadProyectosRegistros de desarrolloPromptsProblemas con herramientas de IAEscaparate
PolíticasQuiénes somosPolítica de privacidadTérminos de servicioCondiciones de suscripciónReembolsosNormas de la comunidad
CuentaIniciar sesiónRegistrarse
Visitantes
Hoy
Ayer
Vistas totales
Empresa
GXSOFT
Representante
CHOI YOUNG GU
Número de registro mercantil
853-44-00368
Dirección
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Teléfono
+82-10-4404-1523
Correo electrónico
whitecalvin@tastedev.net
Responsable de privacidad
CHOI YOUNG GU

© 2026 TASTEDEVLa información de los productos se basa en fuentes de desarrollo verificadas.Publicado · en mejora

Documentación de ASP.NET Core
ASP.NET Core
Getting Started with ASP.NET CoreProject Structure and ConfigurationCore ConceptsData, Validation and AuthenticationTestingDeployment
Debates

Guía de ASP.NET Core · 2/6

Project Structure and Configuration

Por ahora, este capítulo solo está disponible en inglés.

This chapter walks through the files of a new project, explains how configuration and environments work, and shows common ways to organize code as the app grows.

Files in a new project

dotnet new webapi -o TodoApi produces:

TodoApi/
├── Program.cs
├── TodoApi.csproj
├── TodoApi.http
├── appsettings.json
├── appsettings.Development.json
├── Properties/
│   └── launchSettings.json
├── bin/
└── obj/
FilePurpose
Program.csEntry point: registers services and builds the request pipeline
TodoApi.csprojProject file: SDK, target framework, NuGet packages
appsettings*.jsonConfiguration, with per-environment overrides
Properties/launchSettings.jsonLocal launch profiles for dotnet run and IDEs
TodoApi.httpSample HTTP requests to send from the editor
bin/, obj/Build output; keep them out of source control

The project file

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

</Project>

Microsoft.NET.Sdk.Web makes this an ASP.NET Core project: it references the shared ASP.NET Core framework and adds web-specific implicit usings. TargetFramework follows the SDK that created the project. Packages are added with the CLI, which writes a PackageReference into this file:

dotnet add package Microsoft.EntityFrameworkCore.Sqlite
dotnet list package

Program.cs in two halves

Every Program.cs has the same shape: register services on the builder, then build the app and describe the pipeline. Services must be registered before Build(); after that the container is read-only.

var builder = WebApplication.CreateBuilder(args);

// 1. Services for the dependency injection container
builder.Services.AddOpenApi();

var app = builder.Build();

// 2. Middleware pipeline and endpoints
if (app.Environment.IsDevelopment())
{
    app.MapOpenApi();
}

app.UseHttpsRedirection();
app.MapGet("/health", () => "ok");

app.Run();

appsettings.json and environments

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "Default": "Data Source=todo.db"
  },
  "Todo": {
    "PageSize": 20
  }
}
¿Tienes preguntas sobre este capítulo?
Capítulo anteriorGetting Started with ASP.NET CoreCapítulo siguienteCore Concepts

The environment name comes from ASPNETCORE_ENVIRONMENT (or DOTNET_ENVIRONMENT). Typical values are Development, Staging and Production; when nothing is set, the app runs as Production. appsettings.{Environment}.json is layered on top of appsettings.json, so it only needs the keys that differ.

The default builder reads configuration in this order, and later sources win:

  1. appsettings.json
  2. appsettings.{Environment}.json
  3. User secrets (in Development only)
  4. Environment variables
  5. Command-line arguments

Nested keys use : in code and on the command line, and __ (double underscore) in environment variables:

export ASPNETCORE_ENVIRONMENT=Staging
export Todo__PageSize=50
dotnet run

# or pass the value as an argument to the app
dotnet run -- --Todo:PageSize=50

Keep secrets out of appsettings.json. During development, the Secret Manager stores them outside the project folder:

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:Default" "Host=localhost;Database=todo;Username=dev;Password=dev"

Properties/launchSettings.json holds the local profiles (URLs and environment variables such as ASPNETCORE_ENVIRONMENT=Development). It is used only by dotnet run and IDEs and is not part of the published output, so production settings belong in environment variables or configuration files.

Organizing a growing app

ASP.NET Core does not enforce a folder layout. Common conventions:

  • Endpoints/ or Controllers/: the HTTP surface, grouped by feature
  • Services/: business logic registered in DI
  • Data/: the EF Core DbContext and its Migrations/
  • Models/ or Contracts/: entities and request/response types
  • wwwroot/: static files served by the static file middleware

Larger solutions put the app under src/ and tests under tests/, tied together by a solution file (dotnet new sln, then dotnet sln add). Feature endpoints are often moved out of Program.cs into extension methods:

// Endpoints/TodoEndpoints.cs
public static class TodoEndpoints
{
    public static RouteGroupBuilder MapTodoEndpoints(this IEndpointRouteBuilder app)
    {
        var group = app.MapGroup("/todos");
        group.MapGet("/", () => Array.Empty<string>());
        return group;
    }
}

// Program.cs
app.MapTodoEndpoints();

Summary

  • Program.cs registers services, then builds the middleware pipeline and endpoints.
  • The .csproj file uses the Web SDK; packages come from dotnet add package.
  • Configuration layers JSON files, user secrets, environment variables and arguments; the environment name selects appsettings.{Environment}.json.
  • Folder layout is a team convention; extension methods keep Program.cs short.

0 comentarios

Comentarios destacadosMás recientes primero

Iniciar sesión · Inicia sesión para dejar un comentario.