So far we are working with Typemock version 4.1.1 and the below code works fine on that. Now we are moving to version 5.4.5 and the following code fails. This code is inside TestInitialize.
MockObject _mockDriver = null;
_mockDriver = MockManager.MockObject(typeof(BaseIslac<X>), Constructor.Mocked);
The error is on the second line:
System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method. Type: 'Mock0000BaseIslac`1'. Assembly: 'DynamicMockAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a0857b23fb3f20d9'.
Due to so many dependencies & time frame at the moment we can not change or upgrade to any other version apart from 5.4.5.
Please let us know how to over come this error.