Remote publishing target may be missing in an Editing Farm


Description

When deploying to both Editing and Delivery Farms using the Sitecore Azure module, a remote publishing target reference may end up not being present on an Editing Farm. At the same time, the Editing Farm may show the following error:

ERROR Error while instantiating agent. Definition: <agent type="Sitecore.Azure.Managers.Publishing.PublishTargetRemoteManager, Sitecore.Azure" method="Synchronize" interval="00:05:00" />
Exception: System.Exception
Message: Could not resolve type name: Sitecore.Azure.Managers.Publishing.PublishTargetRemoteManager, Sitecore.Azure (method: Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert)).
Source: Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert)
   at Sitecore.Diagnostics.Error.Raise(String error, String method)
   at Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert)
   at Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)
   at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
   at Sitecore.Tasks.Scheduler.ReadAgents()
 
ERROR Could not resolve type name: Sitecore.Azure.Managers.Publishing.PublishTargetRemoteManager, Sitecore.Azure (method: Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert)).

Solution

To resolve the described issue, please follow these instructions:

  1. Modify the /App_Data/AzureOverrideFiles/App_Config/Include/Azure.ServiceRuntime.config file as shown below.
    <configuration>
    ...
      <sitecore>
      ...
        <scheduling>
          <agent type="Sitecore.Azure.Managers.Publishing.PublishTargetRemoteManager, Sitecore.Azure" method="Synchronize" interval="00:05:00" />
        </scheduling>
      ...
      </sitecore>
    ...
    </configuration>
  2. In the Sitecore Azure application, run the Upgrade Files operation against an Editing Farm.
  3. Wait for some time until the publish agent is run.