Does anyone know if it's possible to update the "CookComputing.XmlRpcV2.dll" library in Umbraco v4.0.3? (from it's current version v2.2.0.4 to v2.3.2.0)
Reason being that I am working on a new package that integrates Umbraco with WordPress... and to do that I'm using a 3rd-party library called JoeBlogs.
JoeBlogs uses a later version of CookComputing.XmlRpcV2, but when I try to copy the new DLL across I get this error...
Could not load file or assembly 'CookComputing.XmlRpcV2, Version=2.2.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Highlighting one of the HttpHandlers as the cause of the error:
Forgot to mention... my fall-back on this is to recompile the JoeBlogs code with the same version of "CookComputing.XmlRpcV2" as Umbraco uses (v2.2.0.4) ... but then concerned about having to maintain different versions for future Umbraco releases? (i.e. v4.1)
Or if the assemblyBinding doesn't work, you could also recompile the new CookComputing.XmlRpcV2 assembly with a different namespace, so you can use the different namespace version in the JoeBlogs project...
Thanks kipusoep, I had that thought too... but didn't want to get my hands dirty with messing around with XmlRpcV2 code.
I know you can have multiple versions of DLLs (side-by-side) in the GAC, but that doesn't sound like a good solution for a re-distributable Umbraco package, (not every one has access to the GAC!)
So far I've gone with re-compiling the JoeBlogs codebase against the v2.2.0.4 XmlRpcV2 (as shipped with Umbraco v4.0.3) ... Not too happy about forking off JoeBlogs thought ... keeping in-sync with future developments could be a headache!
I've recompiled Umbraco (my Medium Trust build) to use XMLRPC.Net 2.4.x, which you can get from here. The hack if you don't fancy recompiling the core is to use an assemblyRedirect, as per your OP, I think the format is correct, but I'd suggest replacing "2.2.0.4" with "2.0.*.*-2.3.*.*".
Assembly binding redirects accept wildcards and ranges of assembly versions, so you can bulk-redirect anything below v2.4, which is the latest recommended build.
My gut feeling is that v2.2.0.4 has "publicKeyToken=null" and later versions have "publicKeyToken=a7d6e17aa302004d". Does that sound like a cause?
Side note: This isn't stopping me from continuing development with my package/plug-in ... but it does prevent me from releasing it "into the wild".
Maybe I'll hold-off until Umbraco v4.1 is out... when this should no longer be a problem! (or that's it only compatible with your Medium Trust edition?)
You can put in a new version of the CookComputing DLL easily if you remove the HttpHandlers which try and use it. They are just the channels ones. I've done it before ;)
But yes, I can expect the problem being with the publicKeyToken not being previously set.
Hi sorry to be posting to such an old post. Did anyone come up with an alternative way to get this to work without having to install to the GAC ? Does anyone know the version used in Umbraco is going to be upgraded ?
@Lee - did you able to solve this? I am trying to find a solution for the same issue.. I need to use MailChimp DLL in my project and its throwing
Unable to load one or more of the types in assembly 'umbraco, Version=1.0.4281.20201, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
System.IO.FileLoadException: Could not load file or assembly 'CookComputing.XmlRpcV2, Version=2.2.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Nice one Lee, had to use this trick a couple of time on an upgrade, good to know for the future where I have had to get the source of projects and compile them againt the correct version of CookComputing...
By clicking on the DLL files and opening the object browser I can see the version numbers and confirm the 2.2.0.4 is in the site folder and the 2.5.0.0 is in the bin folder.
But I continue to get the following error:
Unable to load one or more of the types in assembly 'PerceptiveMCAPI, Version=1.2.4.2, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown: System.IO.FileLoadException: Could not load file or assembly 'CookComputing.XmlRpcV2, Version=2.2.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Any suggestions - I am pulling my hair out over this....
I ran into similar problems Nigel, some of the legacy code I was working with (mailchimp related) had dlls in the bin folder that referenced the CookComputing dll, if I remember right.
What I had to do was put the 2.5.0.0 into a new folder and put the old dll in the main bin then chance the paths for the dependantAssembly codeBase to reflect these changes.
Could not load all types from "Articulate, Version=3.0.1.0,
Culture=neutral, PublicKeyToken=null" due to LoaderExceptions,
skipping: . System.IO.FileLoadException: Could not load file or
assembly 'CookComputing.XmlRpcV2, Version=2.5.0.0, Culture=neutral,
PublicKeyToken=a7d6e17aa302004d' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
How exactly can I fix this, and why does this happen? It seems to happen out of no where...my localhost site works fine, then when I shut down and come back a few days later, I get the above error...how can I fix this?
Update CookComputing.XmlRpcV2.dll?
Does anyone know if it's possible to update the "CookComputing.XmlRpcV2.dll" library in Umbraco v4.0.3? (from it's current version v2.2.0.4 to v2.3.2.0)
Reason being that I am working on a new package that integrates Umbraco with WordPress... and to do that I'm using a 3rd-party library called JoeBlogs.
JoeBlogs uses a later version of CookComputing.XmlRpcV2, but when I try to copy the new DLL across I get this error...
Highlighting one of the HttpHandlers as the cause of the error:
I looked into doing a bit of "bindingRedirect", but started to get confused with how it should work...! :-$
Here's what I tried:
... so it is possible to update the "CookComputing.XmlRpcV2.dll" library?
Thanks in advance, Lee.
Forgot to mention... my fall-back on this is to recompile the JoeBlogs code with the same version of "CookComputing.XmlRpcV2" as Umbraco uses (v2.2.0.4) ... but then concerned about having to maintain different versions for future Umbraco releases? (i.e. v4.1)
Or if the assemblyBinding doesn't work, you could also recompile the new CookComputing.XmlRpcV2 assembly with a different namespace, so you can use the different namespace version in the JoeBlogs project...
Thanks kipusoep, I had that thought too... but didn't want to get my hands dirty with messing around with XmlRpcV2 code.
I know you can have multiple versions of DLLs (side-by-side) in the GAC, but that doesn't sound like a good solution for a re-distributable Umbraco package, (not every one has access to the GAC!)
So far I've gone with re-compiling the JoeBlogs codebase against the v2.2.0.4 XmlRpcV2 (as shipped with Umbraco v4.0.3) ... Not too happy about forking off JoeBlogs thought ... keeping in-sync with future developments could be a headache!
I'm open to all suggestions.
Thanks, Lee.
Lee,
I've recompiled Umbraco (my Medium Trust build) to use XMLRPC.Net 2.4.x, which you can get from here. The hack if you don't fancy recompiling the core is to use an assemblyRedirect, as per your OP, I think the format is correct, but I'd suggest replacing "2.2.0.4" with "2.0.*.*-2.3.*.*".
Assembly binding redirects accept wildcards and ranges of assembly versions, so you can bulk-redirect anything below v2.4, which is the latest recommended build.
Hope this helps.
Benjamin
Benjamin,
Not much joy with the "bindingRedirect" ... I've tried all sorts of combinations of "oldVersion", "publicKeyToken", etc. (wildcards, ranges)
My gut feeling is that v2.2.0.4 has "publicKeyToken=null" and later versions have "publicKeyToken=a7d6e17aa302004d". Does that sound like a cause?
Side note: This isn't stopping me from continuing development with my package/plug-in ... but it does prevent me from releasing it "into the wild".
Maybe I'll hold-off until Umbraco v4.1 is out... when this should no longer be a problem! (or that's it only compatible with your Medium Trust edition?)
Thanks again, Lee.
You can put in a new version of the CookComputing DLL easily if you remove the HttpHandlers which try and use it. They are just the channels ones. I've done it before ;)
But yes, I can expect the problem being with the publicKeyToken not being previously set.
I am running into this issue with YAF...
Did you ever solve this? The 'name' attribute of <assemblyIdentity> is the only one which is required.
Deploy one to the GAC and leave the other in the bin folder
Hi sorry to be posting to such an old post. Did anyone come up with an alternative way to get this to work without having to install to the GAC ? Does anyone know the version used in Umbraco is going to be upgraded ?
@Lee - did you able to solve this? I am trying to find a solution for the same issue.. I need to use MailChimp DLL in my project and its throwing
Unable to load one or more of the types in assembly 'umbraco, Version=1.0.4281.20201, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
System.IO.FileLoadException: Could not load file or assembly 'CookComputing.XmlRpcV2, Version=2.2.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Tried bindingRedirect but not working!
Hi Anz,
Believe it or not, I've just come across this problem again (this morning!)
The only way I can find around this is to have 2 copies of the assembly, with the 2nd in a sub-directory, then you can redirect via assembly binding:
You'll probably already have other items in your "runtime/assemblyBinding" section, so just add the "dependentAssembly" segment to your existing one.
You can call the sub-directory whatever you like, I've called it "YAF" as I'm doing a tight integration with YAF at the moment.
Cheers, Lee.
Hey Lee.. It worked great.... thanks alot :)
Hi Lee.
Thank you for sharing. It help me.
BR, Dmitriy
Nice one Lee, had to use this trick a couple of time on an upgrade, good to know for the future where I have had to get the source of projects and compile them againt the correct version of CookComputing...
Hi Lee
Not sure if you can assist, but I have added the dependentAssembly in the web.config as detailed. My code is:
By clicking on the DLL files and opening the object browser I can see the version numbers and confirm the 2.2.0.4 is in the site folder and the 2.5.0.0 is in the bin folder.
But I continue to get the following error:
Unable to load one or more of the types in assembly 'PerceptiveMCAPI, Version=1.2.4.2, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
System.IO.FileLoadException: Could not load file or assembly 'CookComputing.XmlRpcV2, Version=2.2.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Any suggestions - I am pulling my hair out over this....
Cheers, Nigel
I ran into similar problems Nigel, some of the legacy code I was working with (mailchimp related) had dlls in the bin folder that referenced the CookComputing dll, if I remember right.
What I had to do was put the 2.5.0.0 into a new folder and put the old dll in the main bin then chance the paths for the dependantAssembly codeBase to reflect these changes.
Hopefully this willl work for you.
Hi Brendan
You must be up late...
Thanks for your prompt response - being "down under" I hadn't expected such a prompt response. :-)
I have swapped them round and ka ching - the site is running again - fan-damn-tastic I say !
Thanks for your suggestion - very much appreciated.
Cheers, Nigel
No worries glad it worked :)
Hi, I'm getting a similar error:
How exactly can I fix this, and why does this happen? It seems to happen out of no where...my localhost site works fine, then when I shut down and come back a few days later, I get the above error...how can I fix this?
Check your /bin folder has the cookComputting dll if not download from https://www.nuget.org/packages/CookComputing.XmlRPCv2
is working on a reply...