This post is a contribution from Charls Tom, an engineer with the SharePoint Developer Support team
When you build a Visual Studio Workflow targeting SharePoint 2013, you will see this error if you are using any expression that’s not supported inside a workflow.
The reason for this is that 2013 workflows support only a very limited subset of .NET framework methods. In case you really need to so some operations that are not
, best workaround is to implement it as a custom REST service method and call it using (
) where necessary.