Cannot find all types required by the 'async' modifier.

I am trying to create a method with asyn in VS 2013 but getting error

Cannot find all types required by the 'async' modifier. 
Are you targeting the wrong framework version, or missing a reference to an assembly?   

Here is my method:

private async static void SaveData(Int32 ID)
{
   //My code
}
  • async
  • c#
1
 
Asked: 04 Sep 2013
Reputation: 37
Farrell Grannen
1 Answer

Open project property and change your application Framework

Change it to: .Net Framework 4.5

Rebuild your application and it will work smooth now.

2
 
Answered: 04 Sep 2013
Reputation: 72
Riley Knapp
Login to post your answer