title: Visual Studio 2015 intellisense and ambiguous namespaces
body: <p>The <a href="https://github.com/xamarin/Xamarin.Auth" rel="nofollow">Xamarin.Auth</a> project broke up i.e. the source code was compiling OK and after another Xamarin.Android update it was suddenly broken.</p>
  
  <p>It turned out that the problem arose after the <code>Mono.Android.dll</code> (Xamarin.Android) was extended by several namespace definitions.</p>
  
  <p>I hunted the problem down to the following:</p>
  
  <p>There is a dll #1 (Mono.Android.dll):</p>
  
  <pre><code>namespace Xamarin.Android
  {
      public class Class1
      {
      }
  }
  
  namespace Android.OS
  {
      public class Class2
      {
      }
  }
  </code></pre>
  
  <p>There is a dll #2 (Xamarin.Auth.Android.dll):</p>
  
  <pre><code>namespace Xamarin.Auth
  {
      //This does not compile. See the problem description below.
      public class User1 : Android.OS.Class2
      {
      }
  }
  </code></pre>
  
  <p>Intellisense shows the following problem:</p>
  
  <blockquote>
    <blockquote>
      <p>Error CS0234  The type or namespace name 'OS' does not exist in the namespace 'Xamarin.Android' (are you missing an assembly reference?)</p>
    </blockquote>
  </blockquote>
  
  <p>This can be fixed by changing the latter namespace to something else or by using the <code>global::</code> identifier:</p>
  
  <pre><code>namespace SomeOtherNamespace
  {
      //This compiles ok.
      public class User1 : Android.OS.Class2
      {
      }
  }
  
  namespace Xamarin.Auth
  {
      //This compiles ok.
      public class User1 : global::Android.OS.Class2
      {
      }
  }
  </code></pre>
  
  <p>The question is: why does not intellisense give a warning that the <code>Android</code> namespace branch is ambiguous between <code>global::Xamarin.Android</code> and <code>global::Android</code>? What is the good way out of it? Always use <code>global::</code> namespace identifier?</p>