Forum Discussion

Audi86's avatar
Audi86
Brass Contributor
Aug 01, 2023

Error while running CSOM code : Error: Cannot find an overload for "WorkflowServicesManager"...

Hi, I am trying t get the list of all running 2013 workflows on our SharePoint online env. . I tried running PnP and CSOM code but continuously getting this error after inserting credentials in VS code

Error: Cannot find an overload for "WorkflowServicesManager" and the argument count: "2".

 

has workflow service manager depreciated?

1 Reply

  • LainRobertson's avatar
    LainRobertson
    Silver Contributor

    Audi86 

     

    I'm not a SharePoint guy but the error is straightforward and generically applies to any and everything.

     

    This error comes up when a constructor or method is called where there is no match between the constructor/method definition(s) and the parameters passed in.

     

    Because you've provided no code to inspect, I'll demonstrate with a bogus example that uses the common [Int32] class.

     

     

    Here, we can see there's four versions of the Parse() method defined, but none of those definitions match the call made in the second command, resulting in the generic "can't find overload" error.

     

    So, you're issue is not that WorkflowServicesManager has been deprecated (which, incidentally, isn't the same as having been removed; it just means it's no longer being actively developed) but that your call to it does not match any known definition.

     

    My suggestion is that you check your parameter types, where I'd expect you have either or both of:

     

    1. The wrong number of parameters;
    2. One or more parameters is of the wrong type.

     

    Cheers,

    Lain

Resources