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
Using a minimal Json file {}
with the JsonConfigurationProvider fails with:
System.ArgumentNullException : Value cannot be null. (Parameter 'key')
at System.Collections.Generic.SortedDictionary`2.set_Item(TKey key, TValue value)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.VisitElement(JsonElement element)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.ParseStream(Stream input)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.Parse(Stream input)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
--- End of stack trace from previous location ---
at Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(ExceptionDispatchInfo info)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
This is because _currentPath will be null and try to set the null to null in the new code path.
Description
Using a minimal Json file
{}
with the JsonConfigurationProvider fails with:
This is because
_currentPath
will be null and try to set thenull
to null in the new code path.runtime/src/libraries/Microsoft.Extensions.Configuration.Json/src/JsonConfigurationFileParser.cs
Line 60 in a52f237
Regression?
Yes, caused by #40829
cc @maryamariyan
This is blocking the Runtime -> AspNetCore dependency update. We can skip our failing tests to workaround, but ideally this will be fixed ASAP.
The text was updated successfully, but these errors were encountered: