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

StackOverflow https://stackoverflow.com/questions/13974610

문제

I have following configuration of my PC:

  • Windows 8
  • Visual Studio 2012
  • .NET Framework 4.5

My Project Configuration is:

  • WP 7.1
  • Silverlight 4.0
  • .NET Framework 4.0
  • CTP ASYNC (installed, using async and await keywords)

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?

thank you!

도움이 되었습니까?

해결책

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!)

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

다른 팁

From the page you downloaded from:

This targeting pack is not required for projects targeting .NET Framework 4.5 or .NET for Windows Store apps. It is only required for projects targeting Silverlight 5 and .NET Framework 4.0. Earlier platform releases are not supported.

Upgarde to Silverlight 5?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top