jcheng31/DarkSkyApi

issue with await

Closed this issue · 1 comments

Hi, I've installed via nugget into an Umbraco 7 project. However, I've received the following error:
Error CS4033 The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

for line: Forecast result = await client.GetWeatherDataAsync(37.8267, -122.423);

(I am following your Quick start guide)
Any ideas how to resolve this error?

Hey - you'll need to add async to the signature of the method you're calling it from. I'm not familiar with Umbraco, though, so I'm not sure if it plays well with async methods.