Camille Laborde
Camille Laborde

Reputation: 858

How to reference two versions of the same DLL on ASP NET 5 solution

Using Visual Studio 2015, I have built a solution with :

My problem is that when I launch my app, only one of the two versions is referenced, causing the application to crash.

My questions are :

Upvotes: 0

Views: 876

Answers (2)

davidfowl
davidfowl

Reputation: 38764

Nope, side by side isn't supported. Don't do it.

Upvotes: 1

Razvan Dumitru
Razvan Dumitru

Reputation: 12452

You must try a binding redirect to see if you can keep only one assembly. About binding redirect you can read here: https://msdn.microsoft.com/en-us/library/2fc472t2(VS.80).aspx or search the stack for this particular keywords.

It really depends if there are same functionalities in the assemblies or there are different functionalities. There isn't a general answer.

If you really need to use two assemblies, here is your answer http://blogs.msdn.com/b/abhinaba/archive/2005/11/30/498278.aspx.

And PS: making NHibernate work with Remotion.linq.dll v2 looks like a big attempt for me (modifying dependencies and things like that).

UPDATE: CodeBase reference https://msdn.microsoft.com/en-us/library/efs781xb.aspx

There is another possibility to bind assembly versions. Copy in GAC and reference them by strong name (they must have one), but i didn't try that.

Upvotes: 0

Related Questions