pose icon indicating copy to clipboard operation
pose copied to clipboard

Running with opencover

Open ilengyel opened this issue 7 years ago • 2 comments

We get the following exception when we run our xunit tests wrapped in an open cover:

    CustomControls.TreeListView.TreeListViewTests.BringIntoObject [FAIL]
      System.NotSupportedException : Specified method is not supported.
      Stack Trace:
           at Pose.IL.MethodRewriter.Rewrite()
           at stub_System.CannotUnloadAppDomainException_VisitedCritical(Int32 , RuntimeMethodHandle , RuntimeTypeHandle )
           at dynamic_System.CannotUnloadAppDomainException_SafeVisited(Int32 )
           at stub_System.CannotUnloadAppDomainException_SafeVisited(Int32 , RuntimeMethodHandle , RuntimeTypeHandle )
           at dynamic_CustomControls.TreeListView_OnInputRequest(TreeListView , InputRequest )
           at stub_virt_CustomControls.TreeListView_OnInputRequest(TreeListView , InputRequest , RuntimeMethodHandle , RuntimeTypeHandle )
           at dynamic_CustomControls.TreeListView.TreeListViewTests+<>c__DisplayClass0_0_<BringIntoObject>b__0(<>c__DisplayClass0_0 )

If we run the same set of tests without open cover, the desired methods appear to be shimmed just fine. I attempted to reproduce this in a minimal project to no success yet, and it also shims just fine with open cover enabled. Let me know if more effort is needed to attempt to reproduce.

ilengyel avatar Oct 30 '17 15:10 ilengyel

@ilengyel I'm working on reproducing this

tonerdo avatar Nov 02 '17 09:11 tonerdo

Same when using dotCover. I guess having both doing IL emit on top of each other isn't working properly?

System.NotSupportedException : Specified method is not supported.
   at Pose.IL.MethodRewriter.Rewrite()
   at stub_...(... , RuntimeMethodHandle , RuntimeTypeHandle )
   at dynamic_...Tests+<>c__DisplayClass7_0_<TestMethod>b__2(<>c__DisplayClass7_0 )

bruno-garcia avatar Apr 08 '18 11:04 bruno-garcia