internal static void CheckAttachCompatibility()

in JetBrains.Profiler.SelfApi/src/Impl/Helper.cs [16:22]


    internal static void CheckAttachCompatibility()
    {
      // Note: This condition will not work on .NET Core 1.x/2.x because Environment.Version is incorrect.
      // Note: We also exclude .NET Core 3.x on macOS because the attach feature is not implemented in it.
      if (HabitatInfo.Platform == JetPlatform.MacOsX && Environment.Version.Major == 3)
        throw new Exception("The self-profiling API is supported only on .NET 5.0 or later");
    }