Helge Kühling
Helge Kühling

Reputation: 51

Reference to Projects which have references to the same dll with different versions

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.

Upvotes: 1

Views: 147

Answers (2)

Julian
Julian

Reputation: 36830

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)

Upvotes: 1

Netferret
Netferret

Reputation: 620

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.

Upvotes: 1

Related Questions