You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddIniFile(".env")
.Build()
;
I get:
Unhandled Exception: System.IO.FileNotFoundException: The configuration file '.env' was not found and is not optional.
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at ConsoleApplication.Program.Main(String[] args)
Is there anything about the fact that the file starts with a dot that gets in the way here? Is there any reason why that should be a limitation?
(Ported from @atrauzzi at https://github.com/dotnet/corefx/issues/11317)
If I use the following:
I get:
Is there anything about the fact that the file starts with a dot that gets in the way here? Is there any reason why that should be a limitation?