6
votes

I'm getting the following error:

Assembly 'Jenkins.Core, Version=2.1.2.22051, Culture=neutral, PublicKeyToken=2f531e0c1c11a32b' uses 'Jenkins.Domain, Version=2.1.1.22051, Culture=neutral, PublicKeyToken=2f531e0c1c11a32b' which has a higher version than referenced assembly 'Jenkins.Domain, Version=2.1.1.22017, Culture=neutral, PublicKeyToken=2f531e0c1c11a32b'

I tried adding the following bindingRedirect in app.config but nothing changed :(

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="Jenkins.Domain" publicKeyToken="2f531e0c1c11a32b" culture="neutral"/>
    <bindingRedirect oldVersion="0.0.0.0-2.1.1.22051" newVersion="2.1.1.22017"/>
  </dependentAssembly>
</assemblyBinding>

These are two nuget packages and yes, I'm guessing the nugets weren't updated together but that's beyond my control (and they are both up to date).

It looks like a very simple application of bindingRedirect but I can't get it to work.

Any help is appreciated :)

1
Did you ever find a solution to this? I just ran into the same problem myself. :/ - S.Richmond
Same here. Not sure the answer below is applicable - Mark
It doesn't seem like it is possible to redirect to an older version. I had a similar situation with other references, and I ended up having to recompile referencing the older version. - 4thex

1 Answers

-1
votes

The new version should be the newer version, you are pointing it at the older version, use newVersion="2.1.1.22051" instead.

Also make sure the nuget package that imported 2.1.1.22051 is still importing the DLL, you may need to re-install the package or manally change which dll is refrenced by your project in the /Packages folder of your solution.