Hi Scott,
Thanks for the extremely speedy reply! The weekend got in the way of my testing the patch immediately. Finally back at work, with the patch installed, the BadImageFormatException is no longer thrown! You just saved my life.
However, I now get the
System.InvalidProgramException: Common Language Runtime detected an invalid program exception... :(
If I use CInt or CDbl to convert a string to an Integer or Double, respectively, the above mentioned exception is thrown. Using Integer.Parse/Double.Parse to accomplish the same thing works fine.
Repro code:
<TestMethod()> _
Public Sub FooTest()
MockManager.Init()
Dim number1 As Integer = Integer.Parse("5") ' Ok
Dim number2 As Integer = CInt("5") ' Throws exception
MockManager.Verify()
End Sub
TypeMock.out contents:
...
Microsoft.VisualStudio.TestTools.Execution.TimeoutMgr instance void Dispose()
T=>0 M=>0
IL_0 = ldarg.0
IL_1 = ldstr 0x7000235B
IL_2 = ldstr 0x70002513
IL_3 = ldnull
IL_4 = call 0x0A000158
IL_5 = brfalse.s 0x2B
IL_6 = ldarg.0
IL_7 = ldstr 0x7000235B
IL_8 = ldstr 0x70002513
IL_9 = ldnull
IL_10 = call 0x0A00015E
IL_11 = dup
IL_12 = ldstr 0x7000235B
IL_13 = ldstr 0x70002513
IL_14 = call 0x0A00015B
IL_15 = isinst 0x010000BC
IL_16 = brtrue.s 0x02
IL_17 = pop
IL_18 = ret
IL_19 = pop
Thin Header - too small (size=34,insersion=62) converting to Fat
Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter instance void Finalize()
T=>0 M=>0
IL_0 = ldarg.0
IL_1 = ldstr 0x700014E0
IL_2 = ldstr 0x70001596
IL_3 = ldnull
IL_4 = call 0x0A0001C1
IL_5 = brfalse.s 0x2B
IL_6 = ldarg.0
IL_7 = ldstr 0x700014E0
IL_8 = ldstr 0x70001596
IL_9 = ldnull
IL_10 = call 0x0A0001C6
IL_11 = dup
IL_12 = ldstr 0x700014E0
IL_13 = ldstr 0x70001596
IL_14 = call 0x0A0001C4
IL_15 = isinst 0x010000C5
IL_16 = brtrue.s 0x02
IL_17 = pop
IL_18 = ret
IL_19 = pop
nop
nop
(Fixed ClassToken)
*INFO: SMALL EH clause TryOffset '0x00000000' HandlerOffset '0x00000050' Changed to: TryOffset '0x00000040' HandlerOffset: '0x00000090'
I guess this is a completely different issue altogether. Perhaps I should have posted in a separate, new thread?
/C