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

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”

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s