AppSettings.Get[ComplexType] broken?

I am referring to various comments you’ve made about using typed configurations, eg:

bool debug = AppSettings.Get<bool>("DebugMode", false);
MyConfig myConfig = AppSettings.Get<MyConfig>();

But I am getting an error that "No overload for the method GET takes 0 parameters"and the only two definitions I see in the IAppSettings interface are:

T Get<T>(string name);

T Get<T>(string name, T defaultValue);

Was the complex type functionality removed or lost? Or am I doing something wrong.
Cheers

You’ve always needed the configuration name of what you wanted to convert into a complex type, e.g:

MyConfig myConfig = AppSettings.Get<MyConfig>(key);
1 Like