diff --git a/AltCover.Engine/Instrument.fs b/AltCover.Engine/Instrument.fs index 1c1a4b76..17685ed7 100644 --- a/AltCover.Engine/Instrument.fs +++ b/AltCover.Engine/Instrument.fs @@ -253,11 +253,7 @@ module internal Instrument = let attrtype = va |> Seq.tryHead let injectRef (ref: string) = - let constructor = - attrtype.Value.AttributeType - .Resolve() - .GetConstructors() - |> Seq.head + let constructor = attrtype.Value.Constructor let blob = System.Collections.Generic.List(System.Text.Encoding.ASCII.GetBytes(ref)) @@ -1484,6 +1480,7 @@ module internal Instrument = [] () \ No newline at end of file diff --git a/AltCover.Monitor.Tests/MonitorTest.fs b/AltCover.Monitor.Tests/MonitorTest.fs index 3e050eb2..6997a9dd 100644 --- a/AltCover.Monitor.Tests/MonitorTest.fs +++ b/AltCover.Monitor.Tests/MonitorTest.fs @@ -84,7 +84,7 @@ module MonitorTests = test' <@ - code > 115 + code > 112 && code < 261 && branch > 24 && branch < 38