Trying to restore a backup for an ActorService and receiving the following error: Method not found: 'Void System.Fabric.RestoreSettings..ctor(Boolean, Boolean)'
There is no inner exception.
It is a custom actor service which Extends ActorService
and Implements an interface which Extends IActorService
I have checked the backupFolder that's passed in and it is valid and has the backup within it. Given that it's restored I don't think it's relevant, but this is a backup that has been retrieved from Azure blob storage
This is the line the exception is thrown by:
await restoreCtx.RestoreAsync(restoreRescription, cancellationToken);
This is the method it sits within:
protected override async Task<bool> OnDataLossAsync(RestoreContext restoreCtx, CancellationToken cancellationToken)
{
try
{
string backupFolder;
backupFolder = await this.backupManager.RestoreLatestBackupToTempLocation(cancellationToken);
RestoreDescription restoreRescription = new RestoreDescription(backupFolder, RestorePolicy.Force);
await restoreCtx.RestoreAsync(restoreRescription, cancellationToken);
DirectoryInfo tempRestoreDirectory = new DirectoryInfo(backupFolder);
tempRestoreDirectory.Delete(true);
return true;
}
catch (Exception e)
{
ActorEventSource.Current.Message("Restoration failed: " + "{0} {1}" + e.GetType() + e.Message);
throw;
}
}
As suggested by @VaclavTurecek the problem was that the Service Fabric Nuget packages were a version ahead of the runtime installed on the server (in this case my local machine). Updating via the Web Platform Installer has resolved the problem.