title: Why am I getting an exception raised from Spring.NET on the call to ContextRegistry.GetContext()?
body: <p><em>Even though the solution is so obvious I should have never have posted this, I'm leaving it up as a reminder and a useful point of reference to others.</em></p>
  
  <p>I've got the following in my app.config file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;sectionGroup name="spring"&gt;
    &lt;section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/&gt;
    &lt;section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" /&gt;
  &lt;/sectionGroup&gt;
  </code></pre>
  
  <p>Followed by:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;spring&gt;
    &lt;context&gt;
      &lt;resource uri="config://spring/objects"/&gt;
    &lt;/context&gt;
    &lt;objects xmlns="http://www.springframework.net"&gt;
      &lt;object name="mediaLibrary" type="AlbumLibraryWPF.AlbumLibrary, AlbumLibraryWPF"/&gt;
    &lt;/objects&gt;
  &lt;/spring&gt;
  </code></pre>
  
  <p>Then in my app I've got:</p>
  
  <pre class="lang-cs prettyprint-override"><code>using Spring.Context;
  using Spring.Context.Support;
  
  public partial class AlbumChecker : Window
  {
      private DataTable dataTable;
  
      private Library library;
      private Thread libraryThread;
  
      public AlbumChecker()
      {
          InitializeComponent();
  
          CreateToolTips();
  
          IApplicationContext ctx = ContextRegistry.GetContext();
          library = (Library)ctx.GetObject("mediaLibrary");
  
          // Other initialisation
      }
  
      // Other code
  }
  </code></pre>
  
  <p>It all compiles quite nicely, however, I'm getting an exception raised on the call to GetContext():</p>
  
  <pre class="lang-none prettyprint-override"><code>Error creating context 'spring.root': Could not load type from string value
  'AlbumLibraryWPF.AlbumLibrary, AlbumLibraryWPF'.
  </code></pre>
  
  <p>I've checked the Spring.NET documentation and can't see what I'm doing wrong - but I clearly have got something wrong, otherwise it wouldn't raise the exception!</p>
  
  <p><code>AlbumLibraryWPF</code> is the namespace and <code>AlbumLibraryWPF.AlbumLibrary</code> is the fully qualified name of the class I want to instantiate. I'm guessing that it's this I've got wrong, but can't see how.</p>