I have tests that run perfectly fine locally, but fail in the build (step 'Typemock via Visual Studio Test').
There's a little piece of code that is executed in the SUT that contains the method System.IO.File.ReadLines(String, Encoding).
However, the error message I get when running these tests in the build:
System.MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable`1<System.String> TypeMock.Interceptors.FileInterceptor.ReadLines(System.String, System.Text.Encoding)'.
It seems that it is looking for a ReadLines method in TypeMock.Interceptors.FileInterceptor instead of System.IO.File.
To be absolutely clear: I am not trying to mock this method! There isn't even a line of code in the solution that tries to mock this method (so let alone a line that could potentially be called).
Can anybody explain this behaviour to me and, more importantly, tell me how to prevent this from happening?