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 I run this code using reflection based binding, the output is Test: True. However, if I set <EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator> in the .csproj file, the output is Test: False.
Am I misunderstanding the behavior/purpose of the source generator, or is this a bug?
I have tried this on both .NET 8 and .NET 9 Preview 5, this reproduces on both versions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Recently I ran into a discrepancy between the source generated binding behavior, and the regular reflection based behavior. Using the following code:
When I run this code using reflection based binding, the output is
Test: True
. However, if I set<EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator>
in the.csproj
file, the output isTest: False
.Am I misunderstanding the behavior/purpose of the source generator, or is this a bug?
I have tried this on both .NET 8 and .NET 9 Preview 5, this reproduces on both versions.
Dependencies:
Beta Was this translation helpful? Give feedback.
All reactions