web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Dynamics CE Tech Blog / The return type of an async...

The return type of an async method must be void, Task or Task

gopi.royal999@gmail.com Profile Picture gopi.royal999@gmail... 430
Hi,

Today I was working on the some work related to KeyVault and I have written async method. The code was error as below. 

"The return type of an async method must be void, Task or Task<T>"



I tried internet and not able to get any answer for it and I was so worried :( as I was not able to understand the issue. It was in the early morning with half sleep I tried this and I thought, this needs some deep understanding and went for a coffee.

After sometime, I just opened the laptop and understood that I didn't the System.Threaing.Tasks namespace in the class file and it fixed the issue.

Moral - You need to take a small break when things are not working and start again if something is failing. Coffee helps :)

Hope this helps.

--
Happy Coding
Gopinath

Comments

*This post is locked for comments