由于某种原因,在运行时,我会获得
的异常 System.AggregateException: One or more errors occurred. (Performance Counters are not supported on this platform.) ---> System.PlatformNotSupportedException: Performance Counters are not supported on this platform.
at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName)
但是,查看系统诊断性能计数器文档,该库适用于.NETCore 2.2
找到该文档