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.
I've investigated up on a c# process that uses the "extern alias" feature to pull in the different assemblies.
What use is the Aliases property of assembly references in Visual Studio 8.
It seems that this feature isn't fully available for vb.net.
Things I've Tried
I've renamed the 2nd dll and added both references to my project. At this point I get tons of:
'blah' is ambiguous in the namespace
Imports version5 = Somedll.Something
<Reference Include="somedll.6.Navigation, Version=126.96.36.199, Culture=neutral, PublicKeyToken=6d02be8724ca751c, processorArchitecture=MSIL">
Imports version5 = SomeDLL5.Something
Imports version6 = SomeDLL6.Something
I'm the VB spec lead. I'm afraid that there's no VB way of doing this (short of reflection, as DaMartyr said). I know this is a drag. I'll put it on the agenda for our next VB Language Design Meeting.