1

I have an error in my asp.net core 2.1 app and would like to set the ASPNETCORE_ENVIRONMENT setting to Development so that I can better debug.

There are samples for the appsettings.json file, but the ones I find specify IIS Express and I do not know what the App Engine uses.

Is there a way I can tell the instance to run with ASPNETCORE_ENVIRONMENT = Development?

Nick
  • 109
  • 1

2 Answers2

0

Try adding the following section to your app.yaml

env_variables:
  ASPNETCORE_ENVIRONMENT: Development

https://cloud.google.com/appengine/docs/flexible/dotnet/reference/app-yaml

Igor
  • 101
  • 1
0

You can set the environment here: WebHost.CreateDefaultBuilder(args) .UseEnvironment(EnvironmentName.Development)

Nick
  • 109
  • 1