you need to install the windows compatibility pack as these are windows only extensions
https://www.nuget.org/packages/Microsoft.Windows.Compatibility
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to create a Console application project in Visual Studio 2022 that runs the example in the .NET Platform Extensions 6 version of System.Diagnostics (https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.countercreationdata?view=dotnet-plat-ext-6.0#examples). When I add the line
private static PerformanceCounter avgCounter64Sample;
to the application, the type PerformanceCounter shows up as not found. If I add "using System.Diagnostics;" it has the same problem, because it references the .NET 6 version of System.Diagnostics, which does not have a definition for PerformanceCounter. It needs to reference the .NET Platform Extensions 6 version of System.Diagnostics. How do I configure a project file to reference that version? And, in general, how do I reference other files in the .NET Platform Extensions 6 area?
you need to install the windows compatibility pack as these are windows only extensions
https://www.nuget.org/packages/Microsoft.Windows.Compatibility