title: MEF 2 - No exports were found that matched the constraint for constructor with multiple overloads
body: <p>Error:</p>
  
  <pre><code>The composition produced a single composition error, with 2 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.
  
  1) No exports were found that match the constraint: 
      ContractName    MyNonMefInterface
      RequiredTypeIdentity    MyNonMefInterface
  
  Resulting in: Cannot set import 'MyMefClass..ctor (Parameter="myNonMefClass", ContractName="MyNonMefInterface")' on part 'MyMefClass'.
  </code></pre>
  
  <p>Is there anyway to tell MEF to <strong>NOT</strong> try to import "myInterface"? Its an optional param that gets defaulted already if it isn't passed in to the constructor:</p>
  
  <pre><code>public MyMefClass() : (new MyNonMefClass()) {}
  public MyMefClass(myNonMefInterface myNonMefClass) {
      _myNonMefClass = myNonMefClass;
  }
  </code></pre>
  
  <p>I'm using MEF 2's new attribute less configuration and doing my RegistrationBuilder like so:</p>
  
  <pre><code>var builder = new RegistrationBuilder();
  builder.ForTypesDerivedFrom&lt;IMyMefClass&gt;().ExportInterfaces();
  ...
  var aggregateCatalog = new AggregateCatalog();
  
  aggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(MyMefClass).Assembly, builder));
  
  var container = new CompositionContainer(aggregateCatalog, CompositionOptions.DisableSilentrejection);
  </code></pre>
  
  <p>Basically I'm always setting the default of MyNonMefClass in the default constructor but allowing myself to overload it for testing. Its not setup for MEF and coming from another dll so if I could just tell MEF to ignore it and use the constructor without params instead that would be the easiest solution. Anyone know how to do that?</p>
  
  <p>Edit: I was able to resolve it by setting the  <code>[ImportingConstructor]</code> tag on the empty constructor, but that means I have to reference MEF in that project as well, would I be able to do it through the new fluent API using the RegistrationBuilder somehow instead?</p>