Skip to content

System.Diagnostics.PerformanceCounter crashes on SurfacePro X #41144

@JensNordenbro

Description

@JensNordenbro

Description

We have created a .NET5 preview7 application where we utilize Performance counters.

On a development machine this works well, but on SurfaceProX the application crashes.

Looking into the PerformanceCounter code in the netcoreapp2.0 folder inside the nuget, it seems to be reliant on registry keys for .NET Framework to be installed in order to load the native dll perfcounter.dll from a directory specified by that those keys.

image

We expected three things:

  1. No reliance on .NET Framework
  2. No reliance on Windows registry
  3. Performance counters to work on SurfaceProX.

Is this a bug or a limitation to how far you want to support System.Diagnostics.

This has apparently been a problem before: https://developercommunity.visualstudio.com/content/problem/310772/module-not-found-exception-when-calling-countersam.html?childToView=394219#comment-394219

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions