title: How to resolve ServiceLocator.Current is null using VSTO and MEF
body: <p>Using MEF in a VSTO project and defined container as follows</p>
  
  <pre><code>        var catalog = new AggregateCatalog();
          catalog.Catalogs.Add(new AssemblyCatalog(this.GetType().Assembly));
          catalog.Catalogs.Add(...);
  
          container = new CompositionContainer(catalog);
          container.SatisfyImportsOnce(this);
  </code></pre>
  
  <p>all's working well using various libraries except where the code uses </p>
  
  <pre><code> ServiceLocator.Current.GetInstance&lt;MyInterface&gt;()
  </code></pre>
  
  <p>which ofcourse throws a NullReferenceException</p>
  
  <p>Considering ServiceLocator is in it's own dll, wondering how to wire it up or is it even possible ?</p>