chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
Hi,

Since my upgrade from Typemock 7.0.9.0 to Typemock 7.1.2.0 (VS2010), some unit tests fail with the following exception :
Test method AppFabric.Admin.Service.DataAccess_UnitTests.Helpers.DataConvertersExtensionsTests.DataConvertersExtensions_ToCacheHostConfigurationTest threw exception: 
System.TypeInitializationException: The type initializer for 'fv' threw an exception. ---> System.TypeInitializationException: The type initializer for 'TypeMock.InterceptorsWrapper' threw an exception. ---> TypeMock.TypeMockException: 
*** Typemock Isolator needs to be linked with Coverage Tool to run, to enable do one of the following:
   1. link the Coverage tool through the Typemock Isolator Configuration
   2. run tests via TMockRunner.exe -link
   3. use TypeMockStart tasks for MSBuild or NAnt with Link 
For more information consult the documentation (see Code Coverage with Typemock Isolator topic)


The full stackstrace is :
gn.c()
TypeMock.InterceptorsWrapper.GetInterceptorsAssembly()
TypeMock.InterceptorsWrapper..cctor()
TypeMock.InterceptorsWrapper.GetIsIntercepted()
fv..cctor()
fv.b(Type A_0)
TypeMock.MockManager.a(Type A_0, Constructor A_1, Object[] A_2, Boolean A_3)
TypeMock.MockManager.MockObject[TMockedType](Constructor mockConstructors)
TypeMock.ArrangeActAssert.InstanceFaker`1.e()
TypeMock.ArrangeActAssert.InstanceFaker`1.c()
gx.Instance[T](Members behavior)
AppFabric.Admin.Service.DataAccess_UnitTests.Helpers.DataConvertersExtensionsTests.DataConvertersExtensions_ToCacheHostConfigurationTest() in D:WorkspacesCodeplexAppCacheAdminServiceTrunkServiceTestsAppFabric.Admin.Service.DataAccess_UnitTestsHelpersDataConvertersExtensionsTest.cs: line 138


In Isolator configuration, I can see that typemock is linked to VS2010 Profilers, so I do not understand why typemock throws this exception.

Have you got an idea or a workaround ?

Best regards,
Matthieu
asked by cdsmklotz (640 points)

11 Answers

0 votes
Hi,

Thank you for sending this info.
I will look into this.
answered by alex (17k points)
0 votes
Hi,

We are still trying to reproduce this issue.

Please advice the next info:

1. In your registry, go to HKEY_CLASSES_ROOTCLSID{B146457E-9AED-4624-B1E5968D274416EC}InprocServer32 and check the default key. Please send is the key data.

2. In your Isolator installation folder (the default is c:Program Files (x86)TypemockIsolator.1), go to x64 x86, and send us the files names that appear in both folders.

I hope this will help us figure out this problem.
Meanwhile, as a workaround do the following:

1. Open command prompt (start- run- cmd) and type the next 4 commands:
2 regsvr32 "C:Program Files (x86)TypemockIsolator.1dMockWeaver.dll"

3. regsvr32 "C:Program Files (x86)TypemockIsolator.1dProfileLinker.dll"

4. regsvr32 "C:Program Files (x86)TypemockIsolator.11MockWeaver.dll"

5. type regsvr32 ""C:Program Files (x86)TypemockIsolator.11MockWeaver.dll"


We will update you as soon as possible.
answered by NofarC (4k points)
0 votes
Hi,

We haven't been able to reproduce this issue locally nor get enough info to fix it
so we've made a patch that should give us the info we need.

You can download the patch here.

Please install this patch, run the tests and send us the new error message.
answered by alex (17k points)
0 votes
Hi - I got the same error as the above when trying to run a unit test from ReSharper & Nunit ? It runs in the TypeMock runner without this error? Any thoughts?
answered by okhan (920 points)
0 votes
Hi,

Can you please send the windows version and the VS version (year + ultimate/premium/pro)?
answered by alex (17k points)
0 votes
WinXP/2010/Premium
answered by okhan (920 points)
0 votes
Hi,

Are you linked to any other profiler?

You can check it in VS -> Typemock menu -> options.
answered by alex (17k points)
0 votes
Hi,

The profiler is set to "None"? Should it be something else?

Thanks,
Omar

profiler.png
answered by okhan (920 points)
0 votes
Hi,

It's fine that you are not linked.
Does it happen only with the combination of R# + Nunit?
Have you tried running with Typemock smart-runner?
answered by alex (17k points)
0 votes
Hi,

Good news on this!

it seems to have gone away with 7.1.7, I was able to run it with NUnit and R#!

Thanks,
Omar
answered by okhan (920 points)
...