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
When binding configuration, it's normally possible to override the conversion by adding a TypeConverterAttribute attribute to the field, property, or class declaration. It does work when binding against a string value but not against a IConfigurationSection.
Failing this message: "Cannot create instance of type 'Item' because one or more parameters cannot be bound to. Constructor parameters must have corresponding properties. Fields are not supported. Missing properties are: 'zero,one'"
Regression?
Not that I know of
Known Workarounds
None that I know of
Configuration
Runtime: .NET 8.0.5
OS: Windows 11 Version 23H2
Architecture: x64
It's probably not specific to that configuration, AFAIK, it's the same behavior in .NET 9 preview versions
Other information
No response
The text was updated successfully, but these errors were encountered:
Description
When binding configuration, it's normally possible to override the conversion by adding a
TypeConverterAttribute
attribute to the field, property, or class declaration. It does work when binding against astring
value but not against aIConfigurationSection
.Reproduction Steps
https://dotnetfiddle.net/gxB9o3
Expected behavior
Item is correctly bound
Actual behavior
Failing this message: "Cannot create instance of type 'Item' because one or more parameters cannot be bound to. Constructor parameters must have corresponding properties. Fields are not supported. Missing properties are: 'zero,one'"
Regression?
Not that I know of
Known Workarounds
None that I know of
Configuration
It's probably not specific to that configuration, AFAIK, it's the same behavior in .NET 9 preview versions
Other information
No response
The text was updated successfully, but these errors were encountered: