4

I have the following dll hell:

  • a ASP.Net project
    • references WebGrease
      • which references Antlr3.Runtime.dll 3.3.1.7705 [stored in /bin/ folder of the asp.net app]
    • references Custom project
      • which references NCalc.codeplex.com
        • which references Antlr3.Runtime.dll 3.1.3.22795 [stored in /bin/CustomProject/ folder of the asp.net app]

unsurprisingly these two version of Antlr are not working well together and I get "The located assembly's manifest definition does not match the assembly reference" errors

I am unwilling to modify the WebGrease project.

I am attempting to upgrade the NCalc project to use 3.3.1.7705 however I am struggling with this

Do you have any suggestions on how to get these two DLL's to work together?

EDIT unfortunately the NCalc code is not compatible with the newer version of antlr so I cannot used binding redirects

Thank you

2
  • You need to use binding redirects.
    – SLaks
    Jun 28, 2013 at 14:24
  • 1
    @SLaks links please. Note that the two version of Antlr.Runtime.dll are not compatible with each other.
    – GreyCloud
    Jun 28, 2013 at 14:29

1 Answer 1

0

Providing NCalc can use the later version of Antlr3.Runtime - ie there are no breaking changes you should be able to use a binding redirect to direct it to load the later version

eg in the web.config file ass something like

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="NCalc" publicKeyToken="xxxxxxxxx" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.1.3.0" newVersion="3.3.1.0" />
      </dependentAssembly> 

    </assemblyBinding>
  </runtime>

I don't think the 4th digit on the versions is used

4
  • "Providing NCalc can use the later version of Antlr3.Runtime" Unfortunately it cannot :-[
    – GreyCloud
    Jun 28, 2013 at 14:33
  • in the end I found a way to upgrade NCalc to run with a 3.1.0 dll and then used a binding to upgrade the final two versions where there were no breaking changes
    – GreyCloud
    Jul 1, 2013 at 8:57
  • @GreyCloud i have the same problem. How you fixed it? can you post a link or something, please?
    – Catalin
    Jan 14, 2015 at 14:29
  • @RaraituL sorry i am still using the solution in my previous comment
    – GreyCloud
    Jan 30, 2015 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.