GlobalHost.ConnectionManager.GetHubContext<T>() Getting error Could not load file or assembly 'System.Diagnostics.PerformanceCounter,

Viewed 88

I have hub service and client. They are both talking but through console application, not able to inject IHubContext.

var context = GlobalHost.ConnectionManager.GetHubContext<HubSec>("TestHub");

And I tried

var context = GlobalHost.ConnectionManager.GetHubContext("TestHub");

Both time getting same error.

1 Answers

Installing the nuget System.Diagnostics.PerformanceCounter solved the issue for me.

Related