.NET Object Allocation Tracking not enabled in Visual Studio 2022

925 Views Asked by At

I am trying to profile the .NET object Allocation in the profiling tools in Visual Studio.

Unfortunately, the option ":NET Object Allocation Tracking" is not enabled for my project.

My project is a .NET 7 application.

Thanks for you help

3

There are 3 best solutions below

1
Nicoara On

In my case when I openned the Performance profiler, the Memory Usage was preselected. If that's your case deselect it and the .Net Object Allocation Tracking will be enabled

0
paradise On

I seems that ".NET Object Allocation Tracking" is mutually exclusive with all other options. Uncheck all of the others tools and it should be enabled.

1
ElPato On

I had similar issue and after few hours of investigation it turned out that IISExpress is causing the problem.

It worked like a charm after switching to kestrel.