Building a web client using the SignalR JavaScript library
Next, we will add the SignalR client-side JavaScript library so that we can use it on a web page:
- Open a command prompt or terminal for the
Northwind.SignalR.Service.Client.Mvc
project/folder. - Install the Library Manager CLI tool, as shown in the following command:
dotnet tool install -g Microsoft.Web.LibraryManager.Cli
This tool might already be installed globally. To update it to the latest version, repeat the command but replace
install
withupdate
.
- Enter a command to add the
signalr.js
andsignalr.min.js
libraries to the project from theunpkg
source, as shown in the following command:libman install @microsoft/signalr@latest -p unpkg -d wwwroot/js/signalr --files dist/browser/signalr.js --files dist/browser/signalr.min.js
Never copy long commands from a PDF and paste them directly to the command prompt. Always clean them up in...