对具有不同版本的相同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)