Does there exist any tool to generate strongly-typed classes for .Net configuration?
-
26-10-2019 - |
Question
I'm looking for a tool to generate strongly-typed classes from XML. I would like to define XML configuration (section, ConfigurationElements etc.) and then generate classes that could handle my configuration through ConfigurationManager.
Solution
Take a look at .NET Configuration Code Generator. It uses a sample of the desired XML to infer the configuration structure and types and generate the code.
OTHER TIPS
Another alternative is Configuration Section Designer
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow