Azure / azure-functions-dotnet-worker

Azure Functions out-of-process .NET language worker
MIT License
419 stars 181 forks source link

Configure `AddUserSecrets` by default in dev environment #2725

Open liliankasem opened 1 week ago

liliankasem commented 1 week ago

Issue describing the changes in this PR

resolves #2661

Pull request checklist

Additional information

UserSecrets are now added by default. when the environment is 'Development'. This changesfollows the same pattern as WebApplicationBuilder, but we need to use EntryAssembly instead.

Q: Do we also want to load in appsettings by default similar to WebApplicationBuilder?

        configuration.AddJsonFile("appsettings.json", optional: true)
            .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);