我无法编译这个简单的代码:
XAML:
xmlns:live="clr-namespace:Microsoft.Live.Controls;assembly=Microsoft.Live.Controls"
<live:SignInButton
Name="SkydriveSignInButton"
ClientId="xxxxx"
Scopes="wl.skydrive_update wl.offline_access wl.basic wl.signin"
Branding="Skydrive"
TextType="SignIn"
SessionChanged="SkydriveSignInButton_OnSessionChanged"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Grid.Row="0"
Grid.Column="1"
/>
C#:
private void SkydriveSignInButton_OnSessionChanged(object sender, Microsoft.Live.Controls.LiveConnectSessionChangedEventArgs e)
{
if (e.Status == LiveConnectSessionStatus.Connected)
{
client = new LiveConnectClient(e.Session);
ListFiles();
}
else
{
client = null;
}
}
public async static void ListFiles()
{
LiveOperationResult operationResultGA = await client.GetAsync("me/skydrive/files");
}
错误是:不能等待'void'
该项目在 VS2010 中,安装了 Bcl.Async 和 Live 5.4 数据包