title: System.MissingMethodException is thrown when calling a Method with ImmutableArray<> on an interface in a different dll
body: <p><strong>Problem</strong></p>
  
  <p>I have the below code in the two respective dlls. dll1 depends on dll2.</p>
  
  <p>When <code>DoWork()</code> is called it will execute <code>myInterface.MyListMethod(ImmutableList&lt;byte&gt;.Empty);</code> fine. When it goes to execute <code>myInterface.MyArrayMethod(ImmutableArray&lt;byte&gt;.Empty);</code> the following exception is thrown:</p>
  
  <p><code>Exception:System.MissingMethodException: Method not found: Namespace.MyArrayMethod(System.Collections.Immutable.ImmutableArray'1&lt;Byte&gt;)</code> </p>
  
  <p><em>dll1.dll</em></p>
  
  <pre><code>public class TestClass
  {
      public void DoWork()
      {
          IMyInterface myInterface = new MyInterface();
          myInterface.MyListMethod(ImmutableList&lt;byte&gt;.Empty);
          myInterface.MyArrayMethod(ImmutableArray&lt;byte&gt;.Empty);          
      }
  }
  </code></pre>
  
  <p><em>dll2.dll</em></p>
  
  <pre><code>public class MyInterface : IMyInterface
  {
      public void MyArrayMethod(ImmutableArray&lt;byte&gt; byteArray)
      {
          // Do stuff
      }
  
      public void MyListMethod(ImmutableList&lt;byte&gt; byteList)
      {
          // Do stuff
      }
  }
  public interface IMyInterface
  {
      void MyArrayMethod(ImmutableArray&lt;byte&gt; byteArray);
      void MyListMethod(ImmutableList&lt;byte&gt; byteList);
  }
  </code></pre>
  
  <p><strong>Testing</strong></p>
  
  <p>From my point of view it seems that <code>ImmutableArray&lt;&gt;</code> is at fault as I've tried this with multiple types, including as you can see above, with other types in the Immutable namespace. It only happens with <code>ImmutableArray&lt;&gt;</code> as far as I've tried.</p>
  
  <p>I've also made sure that both the dlls are the current dlls and there isn't some old cached version hanging around the gac. Updating the Interface to have another method then calling that before MyArrayMethod works as expected.</p>
  
  <p>Visual Studios specifically doesn't pick up calling references to the method on the interface that contains the <code>ImmutableArray&lt;&gt;</code> param but it will for methods with the <code>ImmutableList&lt;&gt;</code>. It will also pick up references if you remove the <code>ImmutableArray&lt;&gt;</code> param from the method.</p>
  
  <p><a href="https://i.stack.imgur.com/w3dya.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w3dya.png" alt="MyArrayMethod only has one reference"></a></p>
  
  <p>The solution builds fine however, it's only when it tries to JIT at run-time that this error is thrown.</p>