StagingHelper.RunSynchronization

Srikanth Sharma asked on July 26, 2017 01:08

We're in the process of migrating to Kentico 10 and encountered this error.

"The name 'StagingHelper' does not exist in the current context"

I looked in the API change reference, it says to StagingHelper was removed; instead use CMS.Synchronization.StagingTaskRunner. But StagingTaskRunner doesn't have the method RunSynchronization.

Is there any substitute for result = StagingHelper.RunSynchronization(ds, serverId, true, currentSiteId, AddLog);

Please advise.

Correct Answer

Brenden Kehren answered on July 26, 2017 01:45

Have you looked at the API Documentation at all? Looks like the RunSynchronization method is available, you just need to instantiate it and set the properties.

StagingTaskRunner str = new StagingTaskRunner(serverID, siteID);
str.RunSynchronization(ds);
0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on July 26, 2017 01:31

Take a look at the API change.

0 votesVote for this answer Mark as a Correct answer

Srikanth Sharma answered on July 26, 2017 01:36

Hi Brenden,

As I mentioned, I have already checked API change page, it refers to StagingTaskRunner. But StagingTaskRunner doesn't have the method RunSynchronization.

Is there any substitute for result = StagingHelper.RunSynchronization(ds, serverId, true, currentSiteId, AddLog);

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.