Reference 2 dlls using the same namespace in vb.net 3.5 project?

前端 未结 3 1896
故里飘歌
故里飘歌 2020-12-20 20:22

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

相关标签:
3条回答
  • 2020-12-20 21:04

    Does this help? "In the rare event that you reference 2 assemblies which have the same type names and the same namespaces (such as 2 different versions of the same dll) - you can distinguish which assembly to use for a given type using an alias. The default alias for all references is global, but you can specify your own alias for any assembly when you reference it (using a compiler switch - or just use the properties box in Visual Studio) - and have an extern alias clause at the top of your code file where you use it - you would access the types from different assemblies with ::MyNamespace.Type"

    Source: two different DLL with same namespace

    0 讨论(0)
  • 2020-12-20 21:12

    Try the System.Reflection Namespace if you can take the performance hit.

    0 讨论(0)
  • 2020-12-20 21:14

    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.

    0 讨论(0)
提交回复
热议问题