Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
374 views
in Technique[技术] by (71.8m points)

c# - Async CTP not working in VS 2010 SP1?

I downloaded Async CTP and installed it on my development machine, which has both VS 2010 and VS 2012. The installation seemed to have completed successfully (no errors).

I created a brand new WinForms project (language: VB.NET), and decorated a Form_Load with Async.

Problem is that Async keyword is not recognized. Did anyone manage to make it work and how?

Doing the same in VS 2012, targeting .NET framework 4.5 works.

Note: I don't need any Silverlight, Windows Phone or even Web at this time.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

As suggested by @Ramhound, I uninstalled everything related to VS 2012 and 2010, then installed 2010 + SP1 + applied Async CTP3. Properly installed Async CTP3 shows a welcome screen and prompts to restart. After that VS 2010 starts supporting the async keyword. However, for the full support, it is required to reference a corresponding library from here (platform dependent):

c:Users\%username%DocumentsMicrosoft Visual Studio Async CTPSamples

In my case it was AsyncCtpLibrary.dll. Otherwise it will highlight the syntax, but won't compile.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...