Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingMethodException at StopAndGetConsoleFriendlyOutputStringWithSqlTimings() method #2

Open
msanaei opened this issue Aug 5, 2014 · 0 comments

Comments

@msanaei
Copy link

msanaei commented Aug 5, 2014

I installed MiniProfiler.Windows 1.0.0 Nuget package in my EF 6.1 winform project (.NET 4)
and used in following code:

 public class MiniProfilerQueryHandlerDecorator<TQuery, TResult> : IQueryHandler<TQuery,    TResult>
 where TQuery : IQueryParameter<TResult>
{
    private readonly IQueryHandler<TQuery, TResult> _decoratee;

    public MiniProfilerQueryHandlerDecorator(IQueryHandler<TQuery, TResult> decoratee)
    {
        _decoratee = decoratee;
    }

    public TResult Handle(TQuery request)
    {
        TResult result;
        using (StackExchange.Profiling.MiniProfiler.Current.Step("Call QueryHandler"))
        {
            result =_decoratee.Handle(request);
        }
        var friendlyString = ConsoleProfiling.StopAndGetConsoleFriendlyOutputStringWithSqlTimings();
        Console.WriteLine(friendlyString);
        Debug.WriteLine(friendlyString);
        return result;
    }
}

but in runtime I get following MissingMethodException:

{"Method not found: 'Boolean StackExchange.Profiling.MiniProfiler.get_HasSqlTimings()'."}
at MiniProfiler.Windows.ConsoleProfiling.StopAndGetConsoleFriendlyOutputStringWithSqlTimings(Int32 includeSqlWithDurationMoreThanMilliseconds, Int32 takeTopNumberOfQueries)
at IASCo.Application.Core.CQRS.Query.QueryHandlerDecorators.MiniProfilerQueryHandlerDecorator2.Handle(TQuery request) in e:\DevProjects\PPL\SRC\NewStructure\IASCo.Application.Core\CQRS\Query\QueryHandlerDecorators\MiniProfilerQueryHandlerDecorator.cs:line 27 at Level4UI.Lists.BaseListFormStructure4.LoadPageData(Expression1 predicate) in e:\DevProjects\PPL\SRC\Level4UI\Lists\BaseListFormStructure.cs:line 46 at Level4UI.Lists.NewListForm4..ctor(BaseListFormStructure`4 listFormStructure, String clickedMenu) in e:\DevProjects\PPL\SRC\Level4UI\Lists\NewListForm.cs:line 72
at Level4UI.MainForm.NavigationItemsClicked(Object sender, NavBarLinkEventArgs e) in e:\DevProjects\PPL\SRC\Level4UI\MainForm.cs:line 422
at DevExpress.XtraNavBar.NavBarItem.RaiseLinkEvent(Object linkEvent, NavBarItemLink link)
at DevExpress.XtraNavBar.NavBarItem.RaiseLinkClicked(NavBarItemLink link)
at DevExpress.XtraNavBar.NavBarItem.RaiseLinkClickedCore(NavBarItemLink link)
at DevExpress.XtraNavBar.NavBarControl.RaiseLinkClicked(NavBarItemLink link)
at DevExpress.XtraNavBar.ViewInfo.NavBarViewInfo.DoLinkClick(NavBarHitInfo hitInfo)
at DevExpress.XtraNavBar.ViewInfo.NavBarViewInfo.DoClick(NavBarHitInfo hitInfo)
at DevExpress.XtraNavBar.ViewInfo.NavBarViewInfo.OnMouseUp(MouseEventArgs e)
at DevExpress.XtraNavBar.NavBarControl.OnMouseUp(MouseEventArgs ev)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraNavBar.NavBarControl.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Level4UI.Program.Main() in e:\DevProjects\PPL\SRC\Level4UI\Program.cs:line 77

at var friendlyString = ConsoleProfiling.StopAndGetConsoleFriendlyOutputStringWithSqlTimings(); line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant