title: Extension methods in referenced assemblies?
body: <p>If I try to call my extension method which is defined like this:</p>
  
  <pre><code>Module LinqExtensions
  &lt;System.Runtime.CompilerServices.Extension()&gt; _
  Public Function ToSortableBindingList(Of TSource)(ByVal source As IEnumerable(Of TSource)) As IBindingList
      If (source Is Nothing) Then
          Throw New ArgumentNullException("source")
      End If
      Return New SortableBindingList(Of TSource)(New List(Of TSource)(source))
  End Function
  End Module
  </code></pre>
  
  <p>by calling</p>
  
  <pre><code>   Dim sss As String()
     sss.AsEnumerable.ToSortableBindingList()
  </code></pre>
  
  <p>it gives an error "ToSortableBindingList is not a member of System.Collections.Generic.IEnumerable(Of String)". </p>
  
  <p>Note: Intellisense autocompletes after the last period! If I try to call context.TestTable.AsEnumerable.ToSortableBindingList (TestTable is a pure EF4 generated class) it not even shows up with intellisense. I don't get why. What's wrong with the extension method declaration "ByVal source As IEnumerable(Of TSource)"?</p>
  
  <h2>*********************************** EDIT ********************************</h2>
  
  <p>Ok, to clarify what's happening I'd like to provide some additional info. 
  I can track down the problem to the following:</p>
  
  <p>Scenario:</p>
  
  <p>Assembly1 (root namespace "myapp"):</p>
  
  <pre><code>...
       &lt;System.Runtime.CompilerServices.Extension()&gt; _
          Public Function ToTest(ByVal source As String) As String
              Return ""
          End Function
  ...
  </code></pre>
  
  <p>'Calling works:</p>
  
  <pre><code>...
  Dim a as string
  a.ToTest()
  ...
  </code></pre>
  
  <p>Assembly2: 
  (Reference to Assembly1 included)</p>
  
  <p>'Calling does not work:</p>
  
  <pre><code>imports myapp
  ...
  Dim a as string
  a.ToTest()
  </code></pre>