NLog.PerformanceCounter provides support for Windows Performance Counters
$ dotnet add package NLog.PerformanceCounterNLog extensions to Display Windows Performance Counters and Update Windows Performance Counters
NLog will only recognize type-alias performancecounter when loading from NLog.config-file, if having added extension to NLog.config-file:
<extensions>
<add assembly="NLog.PerformanceCounter"/>
</extensions>
Alternative register from code using fluent configuration API:
LogManager.Setup().SetupExtensions(ext => {
ext.RegisterTarget<NLog.Targets.PerformanceCounterTarget>();
ext.RegisterLayoutRenderer<NLog.LayoutRenderers.PerformanceCounterLayoutRenderer>();
});