Add environment variables with section prefix on azure function v4 no longer works with section seperator ':'
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
Reproduction steps:
public class Startup : FunctionsStartup
{
public override void ConfigureAppConfiguration(IFunctionsConfigurationBuilder builder)
{
Environment.SetEnvironmentVariable("prefix__section1__key", "value");
var config = builder.ConfigurationBuilder.AddEnvironmentVariables("prefix:section1:").Build();
}
}
the built config does not have data injected. This worked before on V3.
When inspecting the environment variables provider without a prefix; it does display correctly: 'prefix:section1:key':'value'. This makes it confusing on why this prefix doesn't seem to work.
On ASPNET Core 6 this works fine.
Workaround:
ConfigurationBuilder.AddEnvironmentVariables("prefix__section1__")
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.