Symptoms
Error when configuring K2 for SharePoint components during upgrade from 4.5 (1230) to 4.6.5
Diagnoses
The following error appears when trying to configure K2 for SharePoint Features:
Error : in JobDefinitionUpdateCallBack() : Could not load file or assembly 'SourceCode.SharePoint.Workflow, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418) Refresh the page to reset the page, and enable any disabled buttons.
This is on the Post Deployment Configuration page in the K2 for SharePoint configuration wizard after upgrading the K2 components on all SharePoint servers.
Resolution
Please have a look at the following document in regards to using scripts to retract the SharePoint solutions, delete and redeploy them manually.
help.k2.com/files/4102
The error should not appear here after.