In VS2012.2 I have a week-old ASP.NET MVC 4 app targeting .NET 4.5 that, if I use the async
keyword, works as expected.
In a class library project created around the same time, targeting 4.5, I cannot use the async
keyword.
So I created a new ASP.NET MVC 4 (4.5) web app project and again I am unable to use async
Type or namespace name 'async' could not be found
It's one of those problems where I feel like I'm doing something totally stupid. Afterall, I was in Le Mans watching the race and drinking all weekend.
I mean, it should just work in any .NET 4.5 project right? Its a compiler feature.
Blimey. It was something stupid, just didn't add the void or the return type! Obviously async
is interpreted as a type since I didn't include one. I could delete my question, but I'm happy to look like a fool if it helps others ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With