title: Error CS0117: Namespace.A does not contain definition for Interface
body: <p>I'm getting the error:</p>
  
  <hr>
  
  <p>'Namespace.A' does not contain a definition for 'MyObjectInterface' and no extension method 'MyObjectInterface' accepting a first argument of type ...</p>
  
  <hr>
  
  <p>I've looked at <a href="http://support.microsoft.com/?id=821175" rel="nofollow noreferrer">this</a> and <a href="http://msdn.microsoft.com/en-us/library/c4aad8at(vs.80).aspx" rel="nofollow noreferrer">this</a> and neither seems to apply.</p>
  
  <p>The code looks like:</p>
  
  <pre><code>public abstract class Base
  {
      public IObject MyObjectInterface { get; set; }
  }
  
  public class A : Base
  {
      /**/
  }
  
  public class Implementation
  {
      public void Method()
      {
          Base obj = new A();
          obj.MyObjectInterface = /* something */; // Error here
      }
  }
  </code></pre>
  
  <ul>
  <li><p>IObject is defined in a separate assembly, but:</p>
  
  <ul>
  <li>IObject is in a separate assembly/namespace</li>
  <li>Base and A are in the same assembly/namespace each with correct using directives</li>
  <li>Implementation is in a third separate assembly namespace, also with correct using directives.</li>
  </ul></li>
  <li><p>Casting to A before trying to set MyObjectInterface doesn't work</p></li>
  <li>Specifically, I'm trying to set the value of MyObjectInterface to a mock object (though, I created a fake instead to no avail)</li>
  </ul>
  
  <p>I've tried everything I can think of. Please help before I lose more hair.</p>
  
  <p><em>edit</em>
  I can't reproduce the error by creating a test app either, which is why I'm here and why I'm frustrated.</p>
  
  <p>@Reed Copsey: /* something */ is either an NUnit.DynamicMock(IMailer).MockInstance or a Fake object I created that inherits from IObject and just returns canned values.</p>
  
  <p>@Preet Sangha: I checked and no other assembly that is referenced has a definition for an IObject (specifically, it's called an IMailer).</p>
  
  <p>Thing is that intellisense picks up the Property, but when I compile, I get CS0117. I can even 'Go To Definition' in the implementation, and it takes me to where I defined it.</p>