MvcMiniProfiler 1.9 - Step method not recognized by VS or runtime

I just installed MvcMiniprofiler via NuGet in VS 2010.

I can run the profiler and its work smoothly. The problem is that I want to wrap a piece of code in the Step method. I followed suit and use syntax using.

eg.

using(profiler.Step("A"))
{
    // some code to be profiled
}

The problem is that neither the asp.net compiler nor the visual studio will know what the method is Step, and at runtime it will give me a YSOD message.

Compiler error message: CS1061: "MvcMiniProfiler.MiniProfiler" does not contain a definition for "Step" and does not use the extension method "Step", which takes the first argument of the type "MvcMiniProfiler.MiniProfiler", which can be found

.

Step - ?

+5
1

'.Step - - , 0, .

.

using StackExchange.Profiling;

+7

All Articles