I encountered a problem with C# code execution, namely, when executing an asynchronous method, the execution of the entire project is suspended on Invoke Code and is not executed further.
I use a third-party nuget package from the repository. It is a class library. I use them to access the service’s API. The code contains specific syntax that may not be clear because it uses the service’s API keywords. But I assure you, any call to an asynchronous method via Invoke Code will cause a “stop” in the project.
But maybe I’m wrong, and it’s also about the HTTP request… Since my code contains an HTTP request, and I can’t debug it, or at least call MessageBox at certain stages of code execution…
Find errors. Any interaction of this type with the code causes the process to hang. More precisely, invoke code runs indefinitely and does not terminate.
I’m talking about the type: System.Threading.Tasks.Task<>
I would like to know what exactly is causing the problem and how to solve it… Since the error forces you to look for workarounds that are much more difficult to implement! But, apparently, it is not my fate to hear any comments from developers on this issue… Anyway, thank you all for your attention.
I am also facing the same issue with “async System.Threading.Tasks.Task” in invoke code. I have a for each and then an invoke code inside of it. However, when the first iteration is suspended, the second iteration immediately starts and I need synchronously. I used this library because I am implementing a code with ExchangeWebService (EWS) with OAuth2.
Did you find a solution to implement this kind of method?