I am following these instructions to attach the MVC MiniProfiler
to my project.
Steps taken:
Install-Package MiniProfiler.Mvc5 -IncludePrerelease
using StackExchange.Profiling
inGlobal.asax.cs
MiniProfiler.Start()
inApplication_BeginRequest
But Visual Studio complains that
'MiniProfiler' does not contain a definition for 'Start`
So I checked the suggested example file and tried to imitate that but with pretty much the same results, ie
'MiniProfiler' does not contain a definition for 'StartNew`
What is going on here? Does this documentation need to be updated?
I just found the answer! Assuming we are migrating from an old Miniprofiler version to MVC5 version.
For "Start" replace:
With:
This will now give you more the sence that we are creating a new instance on the session. For "Stop" replace:
With:
Any action will now required to call "
MiniProfiler.Current.xxx
" to access that created MiniProfiler and do stuff. Or depending on how and where you are using it, you can call the saved MiniProfiler mp that you created earlier.