没有收集到托管堆数据。此功能要求.NET v4.5或更高版本。

huangapple go评论59阅读模式
英文:

No Managed Heap data was collected. This feature requires .NET v4.5 or greater

问题

使用 Visual Studio 2019 与框架 5.0 性能分析器来查找 ASP.NET Core Web API 应用程序中的内存泄漏。
我已选中“内存使用”复选框。
当我点击停止收集按钮时,出现“未收集到托管堆数据。此功能需要 .NET v4.5 或更高版本”的错误。
有关如何使此功能正常工作的线索吗?

我尝试多次运行内存使用,但仍然遇到相同的错误。

英文:

Using Visual Studio 2019 with framework 5.0 Performance Profiler to find memory leaks in an ASP.NET Core Web API application.
i have ticked "memory usage" checkbox.
when i click on stop collection button i am getting No Managed Heap data was collected. This feature requires .NET v4.5 or greater error.
Any clue on how I could get this thing working?

i have tried to run the memory usage multiple times but getting the same error.

答案1

得分: 1

内存泄漏在.NET中很少见。

如果您确定要查看"内存使用情况"(而不是".NET对象分配跟踪"),请单击内存复选框旁边的齿轮图标,然后启用"启用与快照的Interop堆分析"选项。

然后,在分析过程中,您可以单击"获取快照"按钮。

或者,如果您关心托管内存使用情况,请选择".NET对象分配跟踪"。

英文:

Memory leaks are rare in .NET.

If you're sure you want to look at "memory usage" (as opposed to ".NET Object Allocation Tracking"), click the cog wheel next to the memory checkbox and enable the option "Enable interop heap profiling with snapshots".

You can then click the "Take Snapshot" button during profiling.

Alternatively, if you are interested in managed memory usage, check ".NET Object Allocation Tracking" instead.

huangapple
  • 本文由 发表于 2023年5月17日 18:05:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76270896.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定