In my test I simply installed Sitecore 7 from the Sitecore web application installer. From there on I setup the DMS (Digital Marketing System) which also is a prerequisite to run ECM.
When I had the ECM 2.1 installed correctly, I simply performed a smartpublish (as described in the installation instruction guide) and thought it was time to take a look at the module.
My dissappointment was huge when ECM failed to simply load from the "All Applications" menu.
I got an error stating that the newtonsoft.json.dll was not present in the correct version (3.5):
Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I double-checked this and was not surprised that the newtonsoft.json.dll in my bin folder was actually a much later version (ver. 4.5.x).
Now my question was - how could Sitecore let this bug through? It was a standard installation, I didn't do anything fancy. I couldn't even just start the module? But wait, my frustrations got bigger :/
I then downloaded the newtonsoft.json.dll in order to comply with the demands of the ECM module. I renamed my existing dll in order to neutralize it temporarily, I pasted the newly downloaded dll into the bin folder and refreshed Sitecore. I almost got happy: the ECM module loaded as intended.
But only to disappoint me further. When I tried to create the simplest flow to test-send an email I ran into further issues. When I attempted to edit the text for the test-email to send, I got a new exception. BAM!
This time it stated the reverse problem:
the newtonsoft.json.dll was not present in version 4.5.x. No it isn't I just neutralized it in order to comply with the other darn errormessage aaarrrgh :S
The solution was to add a section of configuration to web.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Lucene.Net" publicKeyToken="85089178b9ac3181" />
<bindingRedirect oldVersion="0.0.0.0-2.9.4.0" newVersion="3.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
This configuration information tells the compiler to look for a newer version of the missing assemblies.
Strange that this is an issue in the first place. Secondly it should at least have been handled simply by submitting the information above as part of the installation instruction.
Well I hope we will get there some day :)