title: ASP.NET Core 2.1 SignalR is not defined
body: <p>This is my chat javascript</p>
  
  <pre><code>"use strict";
  
  var connection = new signalR.HubConnectionBuilder().withUrl("/chathub").build();
  
  connection.on("ReceiveMessage", function (message) {
      var msg = message.replace(/&amp;/g, "&amp;amp;").replace(/&lt;/g, "&amp;lt;").replace(/&gt;/g, "&amp;gt;");
      var encodedMsg = msg;
      var li = document.createElement("li");
      li.textContent = encodedMsg;
      document.getElementById("Messages").appendChild(li);
  });
  
  connection.start().catch(function (err) {
      return console.error(err.toString());
  });
  
  document.getElementById("Send").addEventListener("click", function (event) {
      var message = document.getElementById("Message").value;
      connection.invoke("SendMessage", message).catch(function (err) {
          return console.error(err.toString());
      });
      event.preventDefault();
  });
  </code></pre>
  
  <p>This is the error I get when I run the page with my chat input:</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: signalR is not defined
        at chat.js:3</p>
  </blockquote>
  
  <p>line 3 in <code>chat.js</code> is:</p>
  
  <pre><code>var connection = new signalR.HubConnectionBuilder().withUrl("/chathub").build();
  </code></pre>
  
  <p>I downloaded the <code>SignalR</code> client library from Visual Studio Add Client Side Library. What I have now is a file called <code>jquery.signalR.js</code> and it is the <strong>ASP.NET SignalR Javascript Library 2.4.0.</strong></p>
  
  <p>However, this error doesn't go away and I am unable to proceed for some reason.</p>