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

前端 未结 3 1899
故里飘歌
故里飘歌 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

提交回复
热议问题