Stefano
Stefano

Reputation: 43

App for WP 7.1 with Async CTP dosn't work on WP 8

I just finished installing the SDK of WP8 and wanted to try my app now compatible with WP 7.1 and so I opened the project and compiled, but gives me errors only on the parts that use "async" and "await". I used Async CTP, but doesn't like much WP8. How can I fix and, above all, how can I make it so that the app functions both on WP and WP 8 7.1? Thanks a lot!!!

Upvotes: 1

Views: 725

Answers (2)

Toni Petrina
Toni Petrina

Reputation: 7122

You cannot build Windows Phone 7.1 applications on Windows Phone 8 SDK without upgrading your project.

If you want to maintain WP7.1 version of your application with async/await feature, you will have to have Visual Studio Express 2010 for WP7.1 + Async CTP 3 along with VS2012 Express for Windows Phone.

UPDATE: There is a way to compile WP7 applications on Visual Studio 2012 Express for Windows Phone by using this nifty NuGet package. However, note that it is currently in prerelease version.

Upvotes: 2

Derek Beattie
Derek Beattie

Reputation: 9478

You need to install this: https://nuget.org/packages/Microsoft.Bcl.Async

Blog about the targeting pack: http://blogs.msdn.com/b/bclteam/archive/2012/10/22/using-async-await-without-net-framework-4-5.aspx

Today, we are proud to announce an update to the Async Targeting Pack we had previously released. The previous targeting pack allowed you to use await when targeting .NET Framework 4.0 and Silverlight 5. Our updated targeting pack allows you to use await in Visual Studio 2012 when targeting any of the following platforms (or higher versions):

.NET Framework 4.0 (with KB2468871) Silverlight 4 Windows Phone 7.5 and portable class libraries targeting those platforms

Upvotes: 3

Related Questions