title: MEF export of Repository<T> : IRepository<T>
body: <p>I am trying to use MEF to Export the following:</p>
  
  <pre><code>[Export(typeof(IRepository&lt;&gt;))]
  public class Repository&lt;T&gt; : IRepository&lt;T&gt;
      where T : class
  {
  </code></pre>
  
  <p>With an import of</p>
  
  <pre><code>[Import(typeof(IRepository&lt;&gt;))]
  private IRepository&lt;Contact&gt; repository;
  </code></pre>
  
  <p>But I keep getting an error message when composing MEF of:</p>
  
  <p>=========================================</p>
  
  <p>The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.</p>
  
  <p>1) No valid exports were found that match the constraint '((exportDefinition.ContractName = "Interfaces.IRepository()") &amp;&amp; (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") &amp;&amp; "Interfaces.IRepository()".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.</p>
  
  <p>Resulting in: Cannot set import 'SoCLINQ2SQL.RepositoryTest.repository (ContractName="Interfaces.IRepository()")' on part 'SoCLINQ2SQL.RepositoryTest'.
  Element: SoCLINQ2SQL.RepositoryTest.repository (ContractName="Interfaces.IRepository()") -->  SoCLINQ2SQL.RepositoryTest</p>