TimGeyssens / BundlingAndMinificationForTheMasses

UI layer on top of http://aspnetoptimization.codeplex.com/ for Umbraco
http://www.nibble.be/?p=237
25 stars 5 forks source link

Newtonsoft Json.NET Version Mismatch (Umbraco 7.7.8) #15

Open gilmorem560 opened 6 years ago

gilmorem560 commented 6 years ago

I've recently setup an Umbraco 7.7.8 site from scratch, and when installing Optimus from the Package Manager, I received an error or two on setting up. Unfortunately, I didn't copy the errors at the time, but if they'd be helpful, I can setup another dummy site and try an install again.

Regardless, I found that the issue is that Umbraco 7.7.8 (not sure about other versions) appears to ship with Newtonsoft Json.NET version 6.x, whereas I believe Optimus here requires Json.NET 10.x. I manually copied in version 10.x over the 6.x version that was in my Umbraco install and the issues went away. It's operating as it should now that I've manually updated the libraries. Not sure if there is a way to automatically update those through your setup in the Package Manager or otherwise. Let me know if you need any more information, thank you!

gilmorem560 commented 6 years ago

Actually I've got an update, I had to reinstall Optimus anyway because I needed to add a provider (Sass) and it appears that when installing the providers (or at least when installing Less and Sass) the Newtonsoft.Json DLL, which is 10.0.2.20802 in Umbraco 7.7.8, gets overwritten with version 6.0.6.17820, I was mistaken on the order of events there. In any case, that should be a good test case now to figure out what is going on here. Something in the process of installing providers also overwrites the Newtonsoft.Json version.

Also as an auxiliary, when uninstalling Optimus 1.4.0, I noticed that the System.Web.Optimize namespace declaration in web.config is not automatically removed, I had to manually delete it to get my Umbraco install to load again.