Reputation: 858
Using Visual Studio 2015, I have built a solution with :
An ASP NET Web application with MVC 6 : the project uses Remotion.linq.dll version 2 because of Entity Framemork 7 dependency used for authentication.
Two Windows Class Library : 'Services' and 'Data'. Those two are referenced by the web application. Project Data uses NHibernate to access the data layer, which rely on Remotion.linq.dll version 1.
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
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