AspNetCore.SignalR: 'IClientProxy' does not contain a definition for 'InvokeAsync'

Moh*_*ehr 3 signalr-hub

I have successfully integrated SignalR.AspNetCore into my AbpZero template. everything works fine. However when I tried to add a hub into my application like what has been described in the document, I am getting the following error on

public async Task SendMessage(string message)
{
    await Clients.All.InvokeAsync("getMessage", string.Format("User {0}: {1}", AbpSession.UserId, message));
}
Run Code Online (Sandbox Code Playgroud)

Error CS1061 'IClientProxy' does not contain a definition for 'InvokeAsync' and no extension method 'InvokeAsync' accepting a first argument of type 'IClientProxy' could be found (are you missing a using directive or an assembly reference?)

小智 5

使用SendAsync()对我有用。我正在使用此软件包: <PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.0-preview2-30138" /> 之所以使用它,是因为当我将新客户端添加到Angular项目中时,即npm服务的软件包。软件包此时必须匹配。