无法从使用中推断出TaskAwaiter

Chr*_*ker 13 c# async-await

我的代码中有一条红线await说: The type arguments for method 'TaskAwaiter<TResult> System.WindowsRuntimeSystemExtensions.GetAwaiter<TResult>(this Windows.Foundation.IAsyncOperation 1)' cannot be inferred from the usage. Try specifying the type arguments explicitly

虽然代码编译并且似乎工作正常,但我只是想知道这意味着什么?(英语不是我的第一语言,所以我可能只是不理解这个消息)

private async void Init()
{
    var settings = new I2cConnectionSettings(I2CAddress);
    settings.BusSpeed = I2cBusSpeed.StandardMode;

    var aqs = I2cDevice.GetDeviceSelector(I2CControllerName);
    var dis = await DeviceInformation.FindAllAsync(aqs);
    _device = await I2cDevice.FromIdAsync(dis[0].Id, settings);
    _isInited = true;
}
Run Code Online (Sandbox Code Playgroud)

Chr*_*ker 3

将 resharper 更新到最新版本,解决了问题