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
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
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:\Workspaces\Codeplex\AppCacheAdminService\Trunk\Service\Tests\AppFabric.Admin.Service.DataAccess_UnitTests\Helpers\DataConvertersExtensionsTest.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 (3.1k points)

11 Answers

0 votes
Hi,

Thank you for sending this info.
I will look into this.
answered by (18k 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_ROOT\CLSID\{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)\Typemock\Isolator\7.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)\Typemock\Isolator\7.1\x64\MockWeaver.dll"

3. regsvr32 "C:\Program Files (x86)\Typemock\Isolator\7.1\x64\ProfileLinker.dll"

4. regsvr32 "C:\Program Files (x86)\Typemock\Isolator\7.1\x861\MockWeaver.dll"

5. type regsvr32 ""C:\Program Files (x86)\Typemock\Isolator\7.1\x861\MockWeaver.dll"


We will update you as soon as possible.
answered by (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 (18k 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 (3.4k points)
0 votes
Hi,

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

Are you linked to any other profiler?

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

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

Thanks,
Omar

profiler.png
answered by (3.4k 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 (18k 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 (3.4k points)
...