Task<> does not contain a definition for 'GetAwaiter'

后端 未结 11 1258
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 07:11

Client

iGame Channel = new ChannelFactory ( new BasicHttpBinding ( BasicHttpSecurityMode . None ) , new EndpointAddress ( new Uri ( \"http://loc         


        
11条回答
  •  自闭症患者
    2020-11-30 07:56

    You have to install Microsoft.Bcl.Async NuGet package to be able to use async/await constructs in pre-.NET 4.5 versions (such as Silverlight 4.0+)

    Just for clarity - this package used to be called Microsoft.CompilerServices.AsyncTargetingPack and some old tutorials still refer to it.

    Take a look here for info from Immo Landwerth.

提交回复
热议问题