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.