Publishing Service update crashes Sitecore XP instance

  • Description

    When updating Sitecore Publishing Service (SPS), an error occurs due to incorrect references to some assemblies. For example, System.Net.Http and System.Diagnostics.DiagnosticSource assemblies cannot be loaded after upgrading the SPS module to 3.1.3 version with installed .NET Framework 4.7.0 or earlier. The following exceptions appear in logs:

    System.IO.FileLoadException: Could not load file or assembly 'System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    ...
    Exception: Sitecore.Framework.Publishing.Client.Http.HttpServiceResponseException
    Message: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  • There are two ways to resolve this issue:

    • Download and install .NET Framework 4.7.2 on the server that hosts the Sitecore XP instance.
    • Add the following assembly binding to the Sitecore XP Web.config file:
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.0.0.0" />
      </dependentAssembly>

Applies to:

Publishing Service 3.1 Update-3

June 11, 2019
July 09, 2019

Reference number:

329804