I am attempting to use MEF with my global application settings class that I created.
I want a singleton instance of my ApplicationSettings class. So in the bootstrapper is where i reference it for the first time, and I am doing this:
private ApplicationSettings _appSettings = IoC.Get<ApplicationSettings>();
I get Object Reference not set to an instance of an object error with that line. Shouldn't that create a new instance of the object if it doesn't already exists? This has been my experience when using that with ViewModels.
I'd like to reference the instance in other areas of my app like this:
private ApplicationSettings _appSettings;