title: How to get SignalR Hub Context in a ASP.NET Core?
body: <p>I'm trying to get the context for a hub using the following:</p>
  
  <pre><code>var hubContext = GlobalHost.ConnectionManager.GetHubContext&lt;SomeHub&gt;();
  </code></pre>
  
  <p>The problem is that GlobalHost is not defined. I see it is part of the SignalR.Core dll. At the moment, I have the following in my project .json file, under dependencies:</p>
  
  <pre><code>"Microsoft.AspNet.SignalR.Server": "3.0.0-*"
  </code></pre>
  
  <p>If I add the latest available version of Core:</p>
  
  <pre><code>"Microsoft.AspNet.SignalR.Server": "3.0.0-*",
  "Microsoft.AspNet.SignalR.Core" :  "2.1.2"
  </code></pre>
  
  <p>I get a whole bunch of errors because server and core are conflicting. If I change them to both use version "3.0.0-*", all the conflicts go away, but GlobalHost cannot be found. If I remove Server, and just user Core version 2.1.2 then GlobalHost works, but all the other things needing Server, obviously do not.</p>
  
  <p>Any ideas?</p>