Michael Schnerring
Michael Schnerring

Reputation: 3661

Errors shown near "async" keywords, but build succeeds

When I compile my project without any files opened the build succeeds as expected. Now when I open a file which contains any methods with the async keyword, in my errors window appear messages like this:

Error   6   ; expected  
Error   10  ; expected  
Error   16  A namespace cannot directly contain members such as fields or methods   
Error   2   Identifier expected

When I build the solution, it succeeds, still.

I installed AsyncCTPv3 and the ReSharper. I currently disabled the ReSharper, but still these errors get displayed. Anyone a clue?

edit: The same errors seem to occor near the await keywords. I mean await and async go hand in hand, but it's pretty weird that those errors just occur next to non-.NET-4.0-elements. And the compiler does not even care a bit. I think just Visual Studio has some trouble to interpret these keywords.

Upvotes: 3

Views: 792

Answers (1)

Michael Schnerring
Michael Schnerring

Reputation: 3661

First of all. Lots of thanks to Joshua Drake, who provided this link. Firstly I recognized that my file versions didn't match up with the ones, which should have been there. I reinstalled without any success. Afterwards I've noticed the following paragraph on this site:

Run Windows Update before installing Async CTP v3, and get all updates (including Optional updates) from before October 2011

BUT NONE that came after. Three in particular, KB2635973 and KB2615527 and KB2645410, are known to be incompatible with Async CTP v3.

After installing Async CTP v3, then you can get subsequent updates.

That's been the clue. After uninstalling the three mentioned updates, I reinstalled Async CTP again and it worked. Thanks a lot!

Upvotes: 3

Related Questions