# Environment

Development, Staging or Production, set by ASPNETCORE_ENVIRONMENT.

## What is **Environment**?

The **environment** (`Development`, `Staging`, `Production`) comes from `ASPNETCORE_ENVIRONMENT`. Code can check it to turn on developer-only features like detailed errors.

```csharp
if (app.Environment.IsDevelopment())
{
    app.MapOpenApi();
}
```

Level: Apprentice · [More ASP.NET Core terms at this level](https://www.ask-codey.com/glossary?category=aspnet-core&level=2)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/environment
