Repository navigation
chore: dotnet format PRs - #3097
Conversation
jamescrosswell
left a comment
There was a problem hiding this comment.
Nice (once the checks/errors have been dealt with)!
| [RequiresDynamicCode("Calls Microsoft.Extensions.Configuration.ConfigurationBinder.Bind(Object)")] | ||
| [RequiresUnreferencedCode("Calls Microsoft.Extensions.Configuration.ConfigurationBinder.Bind(Object)")] |
There was a problem hiding this comment.
@jamescrosswell do you know by chance what's up with that?
There was a problem hiding this comment.
No idea. At first glance, the Check failure is nonsense.
There was a problem hiding this comment.
So we added the code it's complaining about in b84faa8... the whole purpose of which was to avoid Dynamic Code in the configuration binding.
The inclusion of Microsoft.Extensions.Configuration.Binder and setting <EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator> in the project file mean that call to Bind will be replaced by a source generated binder... so there isnt' any dynamic code.
If we add the two attributes above, it will break AOT Compatibility (unecessarily).
Fixes #1503
Because I don't want to nitpick or talk about tabs vs spaces.
#skip-changelog