I need to count the number of times each method is called when the project is run.
Also I need to know both the production and the dev mode, whatever tools code or something it can count for me.
I use C# .NETcore vso2017 Enterprise
You could use the Performance Profiler in Visual Studio (Analyze > Performance Profiler...). In Available Tools, check Performance Wizard. Start (choose Instrumentation method).
When the profiling is finished, it should show you the Summary view of the profile. Change the Current View dropdown to Functions. This should list all the functions that were hit during execution along with the number of calls (plus time spent, etc).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With