2

I have two projects in my solution that are using Lucene.Net. Project A have reference to Umbraco and Lucene.Net version 2.9.4.1 and project B have Lucene version 3.0.3.0. I want to use 3.0.3.0 but I can’t upgrade project A to 3.0.3.0 because Umbraco is using the older version.

When I compile I get this error:

Assembly 'B, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Lucene.Net, Version=3.0.3.0, Culture=neutral, PublicKeyToken=85089178b9ac3181' which has a higher version than referenced assembly 'Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181' A

I have tried extern alias but still get the same error.

Is it possible to compile and have different versions of Lucene.Net in each project?

Update

I have also tried adding bindingRedirect direct but get the same error after.

<dependentAssembly>
        <assemblyIdentity name="Lucene.Net" publicKeyToken="85089178b9ac3181" />
        <bindingRedirect oldVersion="0.0.0.0-2.9.4.1" newVersion="2.9.4.1" />
        <bindingRedirect oldVersion="3.0.3.0-3.0.3.0" newVersion="3.0.3.0" />
      </dependentAssembly>

If I understand this right, bindingRedirect tell all projects to use the same version. I want the old version still be used in Project A and the new version to be used in project B.

Zaint
  • 59
  • 6
  • This is a duplicate of this topic: http://stackoverflow.com/questions/4451220/loading-multiple-versions-of-the-same-assembly – Peter R Feb 20 '14 at 10:20

0 Answers0