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

后端 未结 11 1260
佛祖请我去吃肉
佛祖请我去吃肉 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:55

    I had this issue in one of my projects, where I found that I had set my project's .Net Framework version to 4.0 and async tasks are only supported in .Net Framework 4.5 onwards.

    I simply changed my project settings to use .Net Framework 4.5 or above and it worked.

提交回复
热议问题