aspnet / Configuration

[Archived] Interfaces and providers for accessing configuration files. Project moved to https://github.com/aspnet/Extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AddKeyPerFile directory name is invalid

josephgardner opened this issue · comments

Per #818 this is supposedly fixed, but with this code, I'm still getting an error

var config = new ConfigurationBuilder()
	.AddInMemoryCollection(defaultConfig)
	.AddEnvironmentVariables()
	.AddKeyPerFile("nonexistant", optional: true)
	.Build();

System.ArgumentException: 'The directory name M:\...\nonexistant\ is invalid.'

cc: @HaoK

This is fixed in 2.1 RTM, not RC1, what bits are you using?

Thanks for the reply. You are correct, I'm using rc1 which is the latest on nuget.