AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Issue with environment variable case sensitivity

Open grbinho opened this issue 10 years ago • 3 comments

In the documentation about environments

This section is not valid for Linux.

The specified environment name is case insensitive. Whether you set the variable to Development or development or DEVELOPMENT the results will be the same.

I ran into this issue couple of days ago. Case matters.

For example , if you are reading a configuration file depending on the environment, file is called appsetings.production.json and variable is set to "Production". Code that might be using env.EnvironmentName will not read the file on Linux. It will try to read appsettings.Production.json.

grbinho avatar Oct 27 '16 13:10 grbinho

@grbinho I think it might be the case that "The specified environment name is case insensitive." is true for environment variables but not for file names.

We could make it clear that the file names are case sensitive.

Rick-Anderson avatar Oct 27 '16 18:10 Rick-Anderson

master issue #2028

Rick-Anderson avatar Oct 31 '16 00:10 Rick-Anderson

Closing. #2424 addressed issue.

spboyer avatar Feb 09 '17 18:02 spboyer