Profiler must be enabled - VS11 Update 2

4 posts, 0 answers
  1. Christian
    Christian avatar
    5 posts
    Member since:
    Apr 2013

    Posted 17 Apr 2013 Link to this post

    Hi!

    Since I've updated my Visual Studio Premium 2012 to Update 2 (Version: 11.0.60315.01 Update2) following error message is shown when executing Unit-Tests:

    Test method XY threw exception: Telerik.JustMock.MockException: Profiler must be enabled to mock/assert target XY method.

    With Update 1 everything works fine. Thus, if I uninstall Update 2 the tests are running again. I've tried JustMock 2012.1.608.2 and JustMock Q1 2013 SP1.

    Microsoft .NET Framework Version 4.5.50709

    Unit-Test code
    Line 10: Mock.SetupStatic(typeof(XY));
    Line 11: Mock.Arrange(() => XY.XY()).Returns("xy");

    Exception when Unit-Test code is executed
    at Telerik.JustMock.Handlers.InterceptorHandler.Create(Object target, MethodInfo methodInfo, Boolean privateMethod)
      at Telerik.JustMock.MockContext`1.SetupMock(MockExpression`1 expression)
      at Telerik.JustMock.MockContext`1.SetupMock(Expression`1 expression)
      at Telerik.JustMock.Mock.<>c__DisplayClass1`1.<Arrange>b__0(MockContext`1 x)
      at Telerik.JustMock.MockContext.Setup(Instruction instruction, Func`2 function)
      at Telerik.JustMock.Mock.Arrange(Expression`1 expression)
      at XY() in XY.cs: line 11


    This is a very important issue for me, because I want to migrate from Moles to JustMock.

    Can anyone help? 

    Thank you!
  2. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 19 Apr 2013 Link to this post

    Hi Christian,

    It is unfortunate that you are experiencing issue with JustMock.

    To assist you, I will suggest checking this article and completing the steps in it.

    Also, make sure all the Visual Studio profilers are disabled when executing your tests (IntelliTrace, CodeCoverage).

    If the issue still remains after completing the above, we will require the logs from event with ID 1022 (this is better described in step 4) from the link).

    I hope this helps. Please, inform us if you need further assistance.

    Kind regards,
    Kaloyan
    the Telerik team
    Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
  3. DevCraft R3 2016 release webinar banner
  4. Julia Lerman
    Julia Lerman avatar
    2 posts
    Member since:
    May 2006

    Posted 26 Apr 2013 Link to this post

    I tried everything in the KB article  on this topic (http://www.telerik.com/support/kb/justmock/general/handling-the-profiler-must-be-enabled-exception-in-justmock.aspx) and was still getting failures when debugging my test(s), but not running them.

    The suggestion in this thread about Intellitrace was one profiler I hadn't thought of and disabling that did the trick.

    Perhaps you could add that very helpful suggestion to the KB article? :)

    Thanks
  5. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 29 Apr 2013 Link to this post

    Hello Julia,

    I am glad you have solved the issue.

    Also, thanks for the feedback. The article will be updated accordingly.

    Please, contact us again if you need help with anything concerning JustMock.

    Greetings,
    Kaloyan
    the Telerik team
    Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
Back to Top