I just installed MvcMiniprofiler via NuGet in VS 2010.
I am able to start the profiler and its working smoothly. The problem is that i want to wrap a piece of code in the "Step" method. I followed the example and am using the using
syntax.
e.g.
using(profiler.Step("A"))
{
// some code to be profiled
}
The problem is that neither the asp.net compiler nor visual studio is recognizing what the Step
method is and at run-time gives me a YSOD saying.
Compiler Error Message: CS1061: 'MvcMiniProfiler.MiniProfiler' does not contain a definition for 'Step' and no extension method 'Step' accepting a first argument of type 'MvcMiniProfiler.MiniProfiler' could be found
Everything else is working fine.
Has the Step method been replaced by something else ??
'.Step
is an extension method - it is designed this way so it has close to 0 performance impact when profiling is off.
You will need this at the top of your file.
using StackExchange.Profiling;
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