title: Reference 2 dlls using the same namespace in vb.net 3.5 project?
body: <p>I have a vb.net 3.5 class library project that needs to reference two assemblies that have the same namespace. We have two third party dll's in which one is version 5.1 and the other is version 6.1. They have the same dll filename and they utilize the same namespace and functions/class names. The project needs to use one or the other depending on a specific situation. </p>
  
  <p>I've investigated up on a c# process that uses the "extern alias" feature to pull in the different assemblies. </p>
  
  <p><a href="http://blogs.msdn.com/b/ansonh/archive/2006/09/27/774692.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/b/ansonh/archive/2006/09/27/774692.aspx</a></p>
  
  <p><a href="https://stackoverflow.com/questions/286632/what-use-is-the-aliases-property-of-assembly-references-in-visual-studio-8">What use is the Aliases property of assembly references in Visual Studio 8</a></p>
  
  <p>It seems that this feature isn't fully available for vb.net. </p>
  
  <p><strong>Things I've Tried</strong></p>
  
  <p>I've renamed the 2nd dll and added both references to my project. At this point I get tons of:
  <code>'blah' is ambiguous in the namespace</code>. </p>
  
  <p>So I need to alias the different versions. In vb.net you can do aliases on an imports statement like: </p>
  
  <pre><code>Imports version5 = Somedll.Something
  </code></pre>
  
  <p>The problem is I can't setup an assembly reference alias for the different versions of the dll. Apparently in vb.net you can't set these up in the reference properties window. So I tried setting them in in my project file like this: </p>
  
  <pre><code>&lt;Reference Include="somedll.5.Navigation"&gt;
    &lt;HintPath&gt;..\..\Utility\ThirdPartyDLLS\somedll.5.dll&lt;/HintPath&gt;
        &lt;Aliases&gt;SomeDLL5&lt;/Aliases&gt;
        &lt;Private&gt;False&lt;/Private&gt;
  &lt;/Reference&gt;
  &lt;Reference Include="somedll.6.Navigation, Version=6.1.0.0, Culture=neutral, PublicKeyToken=6d02be8724ca751c, processorArchitecture=MSIL"&gt;
    &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
    &lt;HintPath&gt;..\..\Utility\ThirdPartyDLLS\somedll.6.dll&lt;/HintPath&gt;
        &lt;Aliases&gt;SomeDLL6&lt;/Aliases&gt;
        &lt;Private&gt;False&lt;/Private&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <p>I would then expect this to work: </p>
  
  <pre><code>Imports version5 = SomeDLL5.Something
  Imports version6 = SomeDLL6.Something
  </code></pre>
  
  <p>But the "SomeDLL5/6" doesn't show up in intellisense. So how can I reference both dll's in the same project? </p>