I am trying to create a portable class library in Visual Studio 2012 that will be used for the Windows 8 Store app and the Windows Phone 8 app.
I get the following error:
'waitait' requires the type 'Windows.Foundation.IAsyncOperation' to have a suitable GetAwaiter method. Do you miss the using directive for "System"?
In this line of code:
StorageFolder guidesInstallFolder = await Package.Current.InstalledLocation.GetFolderAsync(guidesFolder);
My portable class library is for the .NET Framework 4.5, Windows Phone 8, and .NET for Windows Store apps.
I am not getting this error for this line of code in a clean Windows Phone 8 project, and I am not getting it in the Windows Store app, so I donβt understand why it will not work in my PCL.
GetAwaiter is an extension method in the WindowsRuntimeSystemExtensions class, which is located in System.Runtime.WindowsRuntime.dll. Using Object Browser, I see that this DLL is available in the .NET application component set for the Windows Store and in the Windows Phone 8 component, but not in the .NET Portable Subset. I just donβt understand why it wonβt be in the Portable Subset if it is available on both of my target platforms.
c # windows-store-apps async-await portable-class-library windows-phone-8
Harry len
source share