Using two different versions of the same DLL in an ASP site using two SDK's

柔情痞子 提交于 2019-12-04 17:38:17

Reference both assemblies. Select each on in the Solution Explorer and look at the properties. There should be an Aliases property. Usually this is set to global, however you can change and/or add to this. For example call the first reference Lib1 and the second Lib2.

In your C# you must then put an extern to it, such as:

extern alias Lib1;

You can then reference each individual assembly, like this:

Lib1::Some.Namespace.Type
Lib2::Some.Namespace.Type

If you'd like a better explaination of this read this blog post - http://www.lloydkinsella.net/2012/07/13/extern-alias-underused-or-unknown/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!