Include a *web.{CONFIGURATION}.config* file for each [build configuration (Debug|Release)](/dotnet/core/tools/dotnet-publish#options) requiring a *web.config* transformation.
In the following example, a configuration-specific environment variable is set in *web.Release.config*:
The MSBuild property for the profile name is `$(PublishProfile)`.
If no profile is passed, the default profile name is **FileSystem** and *web.FileSystem.config* is applied if the file is present in the app's content root.
## Environment
Environment transformations are run third, after [Build configuration](#build-configuration) and [Profile](#profile) transforms.
Include a *web.{ENVIRONMENT}.config* file for each [environment](xref:fundamentals/environments) requiring a *web.config* transformation.
In the following example, a environment-specific environment variable is set in *web.Production.config* for the Production environment:
The MSBuild property for the environment is `$(EnvironmentName)`.
When publishing from Visual Studio and using a publish profile, see <xref:host-and-deploy/visual-studio-publish-profiles#set-the-environment>.
The `ASPNETCORE_ENVIRONMENT` environment variable is automatically added to the *web.config* file when the environment name is specified.
## Custom
Custom transformations are run last, after [Build configuration](#build-configuration), [Profile](#profile), and [Environment](#environment) transforms.
Include a *{CUSTOM_NAME}.transform* file for each custom configuration requiring a *web.config* transformation.
In the following example, a custom transform environment variable is set in *custom.transform*:
* [Web.config Transformation Syntax for Web Project Deployment Using Visual Studio](https://docs.microsoft.com/previous-versions/aspnet/dd465326(v=vs.110))