Configuring your app with app.yaml

Note: Some.NET runtimes have reachedend of support. You cannot re-deployversions that use runtimes after their end of support date. We recommend thatyouupgrade your appto use the latest version of .NET.

An App Engine app is configured using anapp.yamlfile, that contains CPU, memory, network and disk resources, scaling, and othergeneral settings including environment variables.

Aboutapp.yaml files

You can specify the runtime configuration for your .NET app,including versions and URLs, in theapp.yaml file. This file acts as a deployment descriptor of a specificserviceversion.

You must first create theapp.yaml file for thedefault service of your appbefore you can create and deployapp.yaml files for additional services.

The followingapp.yaml demonstrates how to configure your app to use the latest.NET version. To use any othersupported version of .NET,you must update yourapp.yaml file. For more information, see.NET runtime.

runtime:aspnetcoreenv:flexruntime_config:operating_system:ubuntu22# This sample incurs costs to run on the App Engine flexible environment.# The settings below are to reduce costs during testing and are not appropriate# for production use. For more information, see:# https://cloud.google.com/appengine/docs/flexible/dotnet/configuring-your-app-with-app-yamlmanual_scaling:instances:1resources:cpu:1memory_gb:0.5disk_size_gb:10env_variables:# The __ in My__Greeting will be translated to a : by ASP.NET.My__Greeting:Hello AppEngine!
Depending on the complexity of your app's service, you might only need to definea few elements in the correspondingapp.yaml file. The following exampledemonstrates what a simple .NET app might require in theflexible environment:

You can specify a unique name for yourapp.yaml files, but then you mustspecify the file name with thedeploymentcommandas well. For example, if you name yourapp.yaml fileservice-name-app.yamlorapp.flexible.yaml, then you must deploy your app using either:

gcloud app deploy service-name-app.yamlgcloud app deploy app.flexible.yaml
To learn more about structuring multiple services andapp.yaml files in yourapp, seeStructuring web services.

All configuration elements

For a complete list of all the supported elements in this configuration file,see theapp.yaml reference.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.