Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Eine App Engine-Anwendung wird über eine app.yaml-Datei konfiguriert. Diese enthält Einstellungen für CPU-, Arbeitsspeicher-, Netzwerk- und Datenträgerressourcen, Skalierungen und andere allgemeine Einstellungen, einschließlich Umgebungsvariablen.
app.yaml-Dateien
Sie können die Laufzeitkonfiguration für Ihre .NET-Anwendung, einschließlich Versionen und URLs, in der Datei app.yaml festlegen. Diese Datei dient als Deployment-Deskriptor für eine bestimmte Dienstversion.
Erstellen Sie zuerst die Datei app.yaml für den Dienst default Ihrer Anwendung. Erst dann können Sie app.yaml-Dateien für zusätzliche Dienste erstellen und bereitstellen.
Die folgende app.yaml-Datei veranschaulicht, wie Sie Ihre Anwendung für die Verwendung der aktuellen .NET-Version konfigurieren. Um eine andere unterstützte Version von .NET zu verwenden, müssen Sie Ihre app.yaml-Datei aktualisieren. Weitere Informationen finden Sie unter .NET-Laufzeit
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!
Je nach Komplexität des Dienstes Ihrer Anwendung müssen Sie möglicherweise nur wenige Elemente in der entsprechenden app.yaml-Datei definieren. Im folgenden Beispiel sehen Sie, welche Angaben für eine einfache .NET-App in der flexiblen Umgebung erforderlich sein können:
Sie können Dateien des Typs app.yaml jeweils eindeutige Namen geben, müssen diese Dateinamen dann aber auch im Bereitstellungsbefehl angeben. Wenn Sie beispielsweise Ihre app.yaml-Datei service-name-app.yaml oder app.flexible.yaml benennen, müssen Sie Ihre Anwendung so bereitstellen:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-01 (UTC)."],[[["\u003cp\u003eApp Engine apps use an \u003ccode\u003eapp.yaml\u003c/code\u003e file to configure resources, scaling, and environment settings like variables.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eapp.yaml\u003c/code\u003e file defines the runtime configuration, including the .NET version, and it acts as a deployment descriptor for a specific service version.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eapp.yaml\u003c/code\u003e for the default service must be created before creating \u003ccode\u003eapp.yaml\u003c/code\u003e files for additional services.\u003c/p\u003e\n"],["\u003cp\u003eYou can name your \u003ccode\u003eapp.yaml\u003c/code\u003e files uniquely, but you must then specify the filename when using the deployment command.\u003c/p\u003e\n"],["\u003cp\u003eSome .NET runtimes have reached end of support, and it's advised to upgrade to the latest .NET version by updating the \u003ccode\u003eapp.yaml\u003c/code\u003e file.\u003c/p\u003e\n"]]],[],null,["# Configuring your app with app.yaml\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n| **Note:** Some [.NET runtimes](/appengine/docs/flexible/lifecycle/support-schedule#net) have reached [end of support](/appengine/docs/flexible/lifecycle/runtime-lifecycle#end_of_support). You cannot re-deploy versions that use runtimes after their end of support date. We recommend that you [upgrade your app](/appengine/docs/flexible/dotnet/runtime#newversions) to use the latest version of .NET.\n\n\u003cbr /\u003e\n\n\nAn App Engine app is configured using an `app.yaml`\nfile, that contains CPU, memory, network and disk resources, scaling, and other\ngeneral settings including environment variables.\n\n\nAbout `app.yaml` files\n----------------------\n\n\u003cbr /\u003e\n\nYou can specify the runtime configuration for your .NET app, including versions and URLs, in the `app.yaml` file. This file acts as a deployment descriptor of a specific [service](/appengine/docs/flexible/an-overview-of-app-engine) version.\n\n\u003cbr /\u003e\n\n\nYou must first create the `app.yaml` file for the `default` service of your app\nbefore you can create and deploy `app.yaml` files for additional services.\n\n\nThe following `app.yaml` demonstrates how to configure your app to use the latest\n.NET version. To use any other [supported version](/appengine/docs/flexible/lifecycle/support-schedule#dotnet) of .NET,\nyou must update your `app.yaml` file. For more information, see\n[.NET runtime](/appengine/docs/flexible/dotnet/runtime). \n\n runtime: aspnetcore\n env: flex\n\n runtime_config:\n operating_system: ubuntu22\n\n # This sample incurs costs to run on the App Engine flexible environment. \n # The settings below are to reduce costs during testing and are not appropriate\n # for production use. For more information, see:\n # https://cloud.google.com/appengine/docs/flexible/dotnet/configuring-your-app-with-app-yaml\n manual_scaling:\n instances: 1\n resources:\n cpu: 1\n memory_gb: 0.5\n disk_size_gb: 10\n\n env_variables:\n # The __ in My__Greeting will be translated to a : by ASP.NET.\n My__Greeting: Hello AppEngine!\n\nDepending on the complexity of your app's service, you might only need to define a few elements in the corresponding `app.yaml` file. The following example demonstrates what a simple .NET app might require in the flexible environment:\n\nYou can specify a unique name for your `app.yaml` files, but then you must\nspecify the file name with the [deployment\ncommand](/appengine/docs/flexible/testing-and-deploying-your-app)\nas well. For example, if you name your `app.yaml` file `service-name-app.yaml`\nor `app.flexible.yaml`, then you must deploy your app using either: \n\n gcloud app deploy service-name-app.yaml\n gcloud app deploy app.flexible.yaml\n\nTo learn more about structuring multiple services and `app.yaml` files in your app, see [Structuring web services](/appengine/docs/flexible/configuration-files).\n\n\u003cbr /\u003e\n\nAll configuration elements\n--------------------------\n\nFor a complete list of all the supported elements in this configuration file,\nsee the\n[`app.yaml` reference](/appengine/docs/flexible/reference/app-yaml)."]]