Skip to content

NRE in ConfigurationBinder.BindInstance #92213

Closed
@RussKie

Description

@RussKie

Description

This looks like a regression which happened between 8.0.0-rc.2.23431.9 (3c48925) and 8.0.0-rc.2.23466.4 (287c10d).

Updating the 1P internal codebase to the latest .NET Extensions, several tests failed with the following stack trace:

at Microsoft.Extensions.Configuration.ConfigurationBinder.BindInstance(Type type, BindingPoint bindingPoint, IConfiguration config, BinderOptions options, Boolean isParentCollection)
at Microsoft.Extensions.Configuration.ConfigurationBinder.BindProperty(PropertyInfo property, Object instance, IConfiguration config, BinderOptions options)
at Microsoft.Extensions.Configuration.ConfigurationBinder.BindProperties(Object instance, IConfiguration configuration, BinderOptions options)
at Microsoft.Extensions.Configuration.ConfigurationBinder.BindInstance(Type type, BindingPoint bindingPoint, IConfiguration config, BinderOptions options, Boolean isParentCollection)
at Microsoft.Extensions.Configuration.ConfigurationBinder.Bind(IConfiguration configuration, Object instance, Action`1 configureOptions)
at Microsoft.Extensions.Options.NamedConfigureFromConfigurationOptions`1.<>c__DisplayClass1_0.<.ctor>b__0(TOptions options)
at Microsoft.Extensions.Options.ConfigureNamedOptions`1.Configure(String name, TOptions options)
at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
at Microsoft.Extensions.Options.UnnamedOptionsManager`1.get_Value()

Reproduction Steps

I'm not familiar with this area of the runtime, nor I'm sufficiently familiar with the 1P codebase I'm updating to craft a standalone repro, so we may need to debug it interactively since this is an internal codebase.

Expected behavior

No NRE, everything continues work as before :)

Actual behavior

Tests fail

Regression?

Yes

Known Workarounds

No response

Configuration

No response

Other information

/cc: @geeknoid @joperezr

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions