title: compiler build error : The call is ambiguous between the following methods or properties
body: <p>I am experiencing a strange compiler error with extension methods. I have an assembly which has an extension method like </p>
  
  <pre><code>public static class MyClass
  {
      public static Bar GetBar(this Foo foo)
      {
          return new Bar();
      }
  }
  </code></pre>
  
  <p>And elsewhere in the same assembly i do something like this</p>
  
  <pre><code>Foo foo = new Foo();
  var bar = foo.GetBar();
  </code></pre>
  
  <p>When i clean and compile everything is OK. BUT once i make a small change (like an extra whitespace) in the assembly and build again I get an error like this:</p>
  
  <blockquote>
    <p>Error 973 The call is ambiguous between the following methods or properties: 'MyNameSpace.MyClass.GetBar(Foo)' and 'MyNameSpace.MyClass.GetBar(Foo)'</p>
  </blockquote>
  
  <p>Only after i clean the project I can build again. Is this a problem in the compiler using an old version of the assembly? Only work around I see now is to replace my extension methods with normal static methods. </p>