【发布时间】:2019-12-03 14:52:09
【问题描述】:
我在 console app .net 4.6 中获得了方法:
using System.Diagnostics;
public static void CPUMonitorTest()
{
var cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
...
}
当尝试在 类库 .NET Core 2.0 中执行此操作时,我遇到了问题:
- 命名空间不存在
我现在能做什么?
【问题讨论】:
标签: c# .net .net-core system.diagnostics