错误:无法找到由“异步”修改所需的所有类型。你指定了错误的框架版本,或缺少一个程序集的引用? [英] ERROR: Cannot find all types required by the 'async' modifier. Are you targeting the wrong framework version, or missing a reference to an assembly?

查看:371
本文介绍了错误:无法找到由“异步”修改所需的所有类型。你指定了错误的框架版本,或缺少一个程序集的引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下我的电脑配置:

I have following configuration of my PC:


  • Windows 8的

  • 的Visual Studio 2012

  • .NET框架4.5

我的项目配置是:


  • WP 7.1

  • 的Silverlight 4.0

  • 的.NET Framework 4.0

  • CTP异步(安装,使用异步和等待关键字)

该项目使用的是Windows 7机器上WP7.1 VS2010写的。现在,我已经升级了电脑的Windows 8,并安装了VS2012。

The project was written using VS2010 on Windows 7 machine for WP7.1. Now I have upgraded the PC to Windows 8 and have installed VS2012.

该项目,然而,抱怨异步修改

The project, however, complaining about 'async' modifier.

无法找到由异步修改所需的所有类型。你指定了错误的框架版本,或缺少一个程序集的引用?

Cannot find all types required by the 'async' modifier. Are you targeting the wrong framework version, or missing a reference to an assembly?

不知道如何解决这个问题?

Any idea how to solve this problem?

谢谢!

推荐答案

有是支持的Silverlight 4对的 - .Bcl.Async>中的NuGet Microsoft.BCL.Async ,或运行安装包Microsoft.Bcl.Async安慰。该软件包支持SL4,WP 7.1+和便携式图书馆(是的!)

There is a newer version of the Async targeting package which supports Silverlight 4. Search for Microsoft.BCL.Async in NuGet, or run install-package Microsoft.Bcl.Async –prein the Package Manager Console. The package supports SL4, WP 7.1+ and Portable Libraries (yes!)

您会发现在BCL团队的博客<一详细说明href=\"http://blogs.msdn.com/b/bclteam/archive/2012/10/19/using-async-await-without-net-framework-4-5.aspx\">Using异步/无的await .NET框架4.5

You will find a detailed description in the BCL team's blog Using async/await without .NET Framework 4.5

这篇关于错误:无法找到由“异步”修改所需的所有类型。你指定了错误的框架版本,或缺少一个程序集的引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆