对具有不同版本的相同dll的引用的项目的引用 [英] Reference to Projects which have references to the same dll with different versions

查看:134
本文介绍了对具有不同版本的相同dll的引用的项目的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的c#类库中,我引用了不同的项目,这些项目引用了具有不同版本的同一dll.

in my c# class lib i have referenced different Projects which have references to the same dll with different versions.

两者都引用nlog.dll,但是一个项目版本为2.1,另一个项目版本为4.2.

Both references the nlog.dll but one project version 2.1 and the other 4.2.

所引用的项目也是类库.它们大多数是.net 2.0和4.5.

The referenced project are class libs, too. Most of them are .net 2.0 and some 4.5.

推荐答案

您需要在GAC中安装,因为您的应用程序只有一个bin文件夹.

You need to install in the the GAC because you application has only one bin folder.

您也可以尝试仅安装带有<assemblyBinding>的NLog 4,但不能保证,因为NLog 2和NLog 4不完全兼容. (因此,主要版本已更改)

You can also try installing only NLog 4 with a <assemblyBinding> but no guarantees as NLog 2 and NLog 4 aren't fully compatible. (hence the major version change)

这篇关于对具有不同版本的相同dll的引用的项目的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆