【发布时间】:2010-07-06 20:48:53
【问题描述】:
我的应用程序正在引用 Microsoft Enterprise library V4.1,而旧的 DLL(外部应用程序)之一需要对 Microsoft Enterprise library V2.0 的引用。我确信我可以在 GAC 中注册这两个程序集,并且应用程序将根据需要开始读取相关的 DLL,但这不是我们的解决方案,因为我们的安全专家不同意接受此解决方案。
有什么方法可以使用 webconfig,我可以明确指定旧 DLL 使用 V2.0,而整个应用程序使用 4.V0。
注意:我们使用的是 Asp.net Visual Studio C#
急需帮助! 谢谢
更新:
尝试了使用privatePath探测的解决方案:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;ExtDLL"/>
</assemblyBinding>
我的 Web 文件夹现在有 ExtDLL 文件夹,其中包含 Microsoft Enterprise 库的 V2.0.0.0 Dlls,但是当我调用使用 V2.0.0.0 程序集的外部 DLL 函数时,我仍然得到以下异常:
...System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
【问题讨论】:
标签: .net assemblies reference versioning enterprise-library