System.IO.FileNotFoundException thrown when publishing SXA sites

  • An unhandled exception is thrown while trying to publish SXA items under the following environment:

    • Sitecore XP 9.1 Update-1 or Sitecore XP 9.2 Initial Release.
    • SXA 1.9 Initial Release.
    • Sitecore Publishing Service Module 9.1.1 or Sitecore Publishing Service Module 9.2.0.

    The root cause of the issue is that new SPS module versions use restructured libraries, which requires to update assembly references. The following message may appear in Sitecore XP logs:

    ManagedPoolThread #2 11:22:34 ERROR One or more exceptions occurred while processing the subscribers to the 'publishingservice:publishend' event.
    Exception[1]: System.IO.FileNotFoundException 
    Message[1]: Could not load file or assembly 'Sitecore.Framework.Publishing.Abstractions, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. 
    Source[1]: Sitecore.XA.Foundation.Publication 
       at Sitecore.XA.Foundation.Publication.Pipelines.PublishEndResultBatch.CheckMediaItemPath.Process(PublishEndResultBatchArgs args)
       at (Object , Object )
       at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
       at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
       at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
       at System.Reactive.Linq.ObservableImpl.Do`1._.OnNext(TSource value)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Reactive.ExceptionHelpers.ThrowIfNotNull(Exception exception)
       at System.Reactive.Linq.QueryLanguage.LastOrDefaultInternal[TSource](IObservable`1 source, Boolean throwOnEmpty)
       at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result) 
  • To resolve the issue, download and install the appropriate hotfix available on the following pages:

    Be aware that these hotfixes were built specifically for the mentioned Sitecore XP releases. Do not install it with other Sitecore XP versions or in combination with other hotfixes, unless explicitly instructed by Sitecore Support.

    Note: you need to extract the archive contents to locate installation instructions and related files inside it.

    To get a solution for other Sitecore XP versions, contact Sitecore Support.

Applies to:

SXA 1.9

SXA 9.3.0

November 28, 2019
November 28, 2019

Reference number: