chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
Hi we are considering replacing ncover with jetbrains dotCover 2.2
Running TypeMock 7.2.5.0

But we are getting some consistent exceptions when reaching a special class when typemock + dotcover is enabled

System.BadImageFormatException : Bad method token.
   at FancyNamespace.UnitConvert.Convert(T inputValue, Unit fromUnit, Unit toUnit)
   at FancyNamespace.UnitConvert.Convert(ValueUnit inputValue, Unit toUnit) in UnitConvert.cs: line 171
   at FancyNamespace.Tests.UnitConvertTest.Assert(Decimal expected, Decimal originalValue, Unit fromValue, Unit toValue) in UnitConvertTest.cs: line 93


public static class UnitConvert
{
      public static ValueUnit Convert(ValueUnit inputValue, Unit toUnit)
      {
         return new ValueUnit(Convert(inputValue.Value, inputValue.Unit, toUnit), toUnit);
      }

      public static decimal Convert<T>(T inputValue, TUnit fromUnit, TUnit toUnit) where T : IConvertible
      {
             // Snip
      }


If we rename one of the Convert methods, tests start to work again.
If we disable TypeMock then the tests work again.
If we disable dotCover then the tests work again.
asked by keke (2.3k points)

1 Answer

0 votes
Hi,

Can you please turn Isolator logs on, run the tests with coverage and send the logs to support@typemock.com

In order to run Isolator with logs, Go to Visual Studio -> Typemock tab -> options ->Visual Studio tab

Looking forward to your feedback.
answered by alex (17k points)
...