Async CTP not working in VS 2010 SP1?

别来无恙 提交于 2019-11-29 07:57:27

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%\Documents\Microsoft Visual Studio Async CTP\Samples\

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

There should be no need to do this.

You already had VS2012 installed, which has full support for async/await. You can install Microsoft.Bcl.Async to get async/await support on downlevel platforms, including .NET 4.0.

Gennady Vanin Геннадий Ванин

I answered it in Asynchronous Programming with Async and Await and if to use more C# 5.0 features without installing .NET 4.5. /VS2012 (which is impossible in Winfows XP) than just async/await in my answer to Where can I find a TPL dataflow version for 4.0?.

Note that .NET 4.0 on machine with installed .NET 4.5 is different from .NET 4.0 with installed .NET 4.5 In other words you cannot reliably develop and test .NET 4.0 applications on machine with installed .NET 4.5. The latter is independent on wherher you installed extensions or not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!