# Environment Variables in .NET

*noun*

say it: **“en-VY-run-ment VAIR-ee-uh-bulz”** **/ɪnˈvaɪrənmənt ˈvɛriəbəlz/**

Settings given to a .NET app by the system it runs on, with \_\_ standing for each : in a setting's name.

## What is **Environment Variables in .NET**?

Configuration keys can be set with **environment variables**; a double underscore replaces the colon: `ConnectionStrings__Recipes` sets `ConnectionStrings:Recipes`. Azure App Service settings arrive this way.

```powershell
$env:ConnectionStrings__Recipes = "Server=localhost;Database=Recipes;..."
dotnet run
```

## In a sentence

- “In Azure, the connection string comes from an **environment variable**, ConnectionStrings\_\_Northwind.”

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

Updated: November 9, 2026

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