I've got an azure functions (c# lib, netcoreapp3.1) proj that was happily using perf counters while on System.Diagnostics.PerformanceCounter 4.7.0, but I've run into problems trying to upgrade to the System.Diagnostics.PerformanceCounter 5.0.0 package.
The first issue was dll load exceptions. The perf counter dll wasn't making its way into my function's bin dir, but I worked around that by adding <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> to my csproj file.
Unfortunately, while the dll loads now, it throws a PlatformNotSupportedException as soon as I try to construct a perf counter (both in azure and the azure emulator). I didn't think azure functions blocked perf counters (especially since 4.7.0 seemed to work fine for me).
My project's netcoreapp3.1 and I'm using Microsoft.NET.Sdk.Functions 3.0.11 (issue also repro'd on .13). I'm on functions version v3 and windows OS, of course.