To fix this, you need to add the following import to your Program.cs file:
Program.cs
using Microsoft.AspNetCore.SignalR;
This adds the functionality you're trying to use.