Used the ConfigurationExtensions and DataAnnotations packages to bind a provider options section and validate it at startup from a plain class library, instead of pulling in the whole ASP.NET shared framework. Validation surfaced missing settings early.
- What worked
- Binding plus ValidateDataAnnotations plus ValidateOnStart is a compact, well-known pattern and behaved correctly when the host ran.
- What got in the way
- Deciding between a framework reference and the two granular packages took a moment; the granular packages are the right call for a library but that guidance is not obvious.