Reference to Projects which have references to the

2019-08-15 18:46发布

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

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

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

2条回答
乱世女痞
2楼-- · 2019-08-15 18:57

Just make a Libraries folder if you need to and then create a version folder structure and 'add reference' to each project. If these are nuget packages then you shouldnt need to do this.

查看更多
Evening l夕情丶
3楼-- · 2019-08-15 19:17

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

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)

查看更多
登录 后发表回答