I've just installed Isolator 7.0.6 on our TeamCity build server. It previously had Isolator 6.2.5 and all tests were green. I also changed out MSBuild scripts to use the correct folder, so I changed:
<Import Project="C:Program Files (x86)TypemockIsolator.2TypeMock.MSBuild.Tasks" />
To this:
<Import Project="C:Program Files (x86)TypemockIsolatorTypeMock.MSBuild.Tasks" />
After upgrading many tests started failing. Practically all the exceptions complain about SimpleBitVector32 and look like so:
Test method GRT.Core.Distributor.Test.MessageDistributorEntryPointTest.HandleMessage_NoAdapters_ReturnHandled threw exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'GRT.Core.Distributor.Service.Adapter.AdapterManager' threw an exception. ---> TypeMock.TypeMockException:
*** Faking behavior on struct System.Configuration.SimpleBitVector32 is not supported in the following cases:
1. Faking behavior on more than one struct of the same type.
2. Faking behavior on more than one method on the same struct.
at gk.a(Type A_0, Object A_1, MethodBase A_2, String A_3, TypeParams A_4)
at gk.a(Object A_0, String A_1, String A_2, MethodBase A_3, Object[] A_4, Object A_5)
at TypeMock.MockManager.getReturn(Object context, String typeName, String methodName, Object methodGenericParams, Boolean isDecorated, Boolean isInterceptedType, Object[] methodArguments)
at Typemock.Interceptors.Profiler.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected, Boolean isInterceptedType, Object p1)
at System.Configuration.SimpleBitVector32.get_Item(Int32 bit)
at System.Configuration.FactoryRecord.get_IsGroup()
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.get_ConnectionStrings()
at GRT.Core.Distributor.Service.Adapter.AdapterManager.LoadAdapters() in e:TeamCityuildAgentworkd8b67c28b2b4cc5BackEndGRT.CoreGRT.Core.DistributorGRT.Core.Distributor.ServiceAdapterAdapterManager.cs:line 97
at GRT.Core.Distributor.Service.Adapter.AdapterManager..ctor() in e:TeamCityuildAgentworkd8b67c28b2b4cc5BackEndGRT.CoreGRT.Core.DistributorGRT.Core.Distributor.ServiceAdapterAdapterManager.cs:line 87
at GRT.Core.Distributor.Service.Adapter.AdapterManager..cctor() in e:TeamCityuildAgentworkd8b67c28b2b4cc5BackEndGRT.CoreGRT.Core.DistributorGRT.Core.Distributor.ServiceAdapterAdapterManager.cs:line 23
--- End of inner exception stack trace ---
at GRT.Core.Distributor.Service.Adapter.AdapterManager.GetInstance()
at GRT.Core.Distributor.Test.MessageDistributorEntryPointTest.<HandleMessage_NoAdapters_ReturnHandled>b__2() in e:TeamCityuildAgentworkd8b67c28b2b4cc5BackEndGRT.CoreGRT.Core.DistributorGRT.Core.Distributor.UnitTestsMessageDistributorEntryPointTest.cs:line 81
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at gr.c()
at be.a(Boolean A_0)
at dr.b(Boolean A_0)
at iz.b(Boolean A_0)
at iz.a(Object A_0, Boolean A_1, Func`1 A_2, Action A_3, Action A_4, Action A_5, Boolean A_6)
at iz.b(Object A_0)
at TypeMock.ArrangeActAssert.ExpectationEngine`1.a(TResult A_0)
at GRT.Core.Distributor.Test.MessageDistributorEntryPointTest.HandleMessage_NoAdapters_ReturnHandled() in e:TeamCityuildAgentworkd8b67c28b2b4cc5BackEndGRT.CoreGRT.Core.DistributorGRT.Core.Distributor.UnitTestsMessageDistributorEntryPointTest.cs:line 90
What is causing the tests to break?