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
We are using Typemock Isolater version 6.0.3.0 with Visual Studio 2010. A couple of months ago our unit tests just stopped working. We are getting the following error:

*** Typemock Isolator is not currently enabled.

Stack trace is as follows:

TypeMock.MockManager.l()
TypeMock.MockManager.Init(Boolean collectAllCalls)
TypeMock.MockManager.Init()
TypeMock.MockManager.g(Type A_0)
TypeMock.MockManager.Mock(Type type, Constructor mockConstructors)
TypeMock.MockManager.a(Type A_0, Constructor A_1, Object[] A_2, Boolean A_3)
TypeMock.MockManager.MockObject(Type type, Constructor mockConstructors, Object[] args)
TypeMock.MockManager.MockObject[TMockedType](Constructor mockConstructors)
TypeMock.ArrangeActAssert.InstanceFaker`1.e()
TypeMock.ArrangeActAssert.InstanceFaker`1.c()
if.CreateFakeInstance[T](Members behavior, Constructor constructorFlag, Constructor baseConstructorFlag, Type baseType, Object[] ctorArgs)
if.Instance[T](Members behavior)
DomainTests.Mappers.MissionMapperTests.MyTestInitialize()

But Isolator IS currently enabled. Our Visual Studio menus have a Typemock menu, which shows the menu item "Disable Typemock Isolator." Also, when running Typemock Isolator x64 Configuration, we see "Maintenance expires in 97 day(s)" at the bottom of the window. As far as I know, all this means Isolator should be working fine. It was working fine for months, and we wrote hundreds of unit tests that use it, and we're not sure why we are suddenly getting this error.

Anybody have any ideas? Thank you very much.

- Dave Davidson
asked by daviddavidson3 (1.3k points)

7 Answers

0 votes
Hi Dave,

Does it happen in VS 2010 only? Does the same error appear in VS 2008?
Do you use one of VS 2010 features like Test-Impact or Intellitrace? If so, it may happen due to conflict which has been solved in a recent version. You can try install the latest version from the download page in order to solve it.

Please let us know if the latest version solves it.

Regards,
Elisha,
Typemock Support
answered by Elisha (12k points)
0 votes
Any chance you have JustMock installed in parallel? these two conflict.
answered by royo (2k points)
0 votes
Sorry, I'm not sure if this is a VS 2010-only problem. I'll have to reinstall VS 2008 and make a project to test. We have used Intellitrace, and as far as I can see it's on by default (not sure how to turn it off yet). We're not using JustMock.

I installed the latest version (6.0.6.0) and updated the references in my test project, but I still get the same "Typemock Isolator is not currently enabled" error message when running a unit test that uses Isolator. No joy.

- Dave
answered by daviddavidson3 (1.3k points)
0 votes
You might have a profiler running somewhere, overriding the required environment variable.

To diagnose the situation, we would need to obtain the environment variable of the test runner process. I would like you to perform the following steps:

1) Open Regedit, navigate to:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Options


2) Create a new Key named as the test runner process: If you're using VS2010's MSTest runner, it's called "QTAgent32.exe" (without the quotes)

3) Create a new String Variable called "Debugger", double click it, and set the value to "vsjitdebugger.exe" (again, all without quotes).

4) In your VS2010, under the Typemock menu, select Disable, then Enable Typemock. This will close any cached processes of the test runner.

5) Run your tests. You will get a Just-in-Time dialog, asking you to attach a debugger - that is fine!

6) While the dialog is open, open Process Explorer, and find the test runner process (should be under devenv.exe)

7) Double click on the test runner process, and go to the Environment tab.

8) Find the entry for "COR_PROFILER", and write down the GUID (I think you can't copy-paste, so a screenshot will be fine too).

9) Either post it here, or send it to support@typemock.com

10) Remove the registry key you've added!

Let me know if you need an additional assistance.

Thanks!
answered by igal (5.7k points)
0 votes
Thank you very much for the help. I created the Registry entries you specified (putting the Debugger value in the new QTAgent32.exe key), ran a test, and QTAgent32.exe crashed with exception code 80000003 in module MSCOREE.DLL. After closing the program, I received the following message:

"An error occurred while launching '"C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEQTAgent32.exe" /agentKey 25707841-6d0c-433b-8b65-f41640df1f90 /hostProcessId 5288 /hostIpdcPortName eqt-ffd0710a-11fa-d0da-c135-378d8fd19e4d':

"The Visual Studio Just-In-Time Debugger was not notified that the application correctly started."

So I removed the registry entries and ran several tests so I would have enough time to examine the running process with Process Explorer. There were two processes running under devenv.exe that looked like they could be running tests, QTDCAgent32.exe and QTAgent32.exe. The COR_PROFILER environment variable for QTDCAgent32.exe was {B146457E-9AED-4624-B1E5-968D274416EC}.

The QTAgent32.exe process COR_PROFILER environment variable was {301EC75B-AD5A-459C-A4C4-911C878FA196}. This process was also running Intellitrace.exe.

I hope that information is useful. Thanks for the help.

- Dave
answered by daviddavidson3 (1.3k points)
0 votes
Thank you very much for the information, David,

The GUID you found, and QTDCAgent32.exe both belong to Visual Studio 2010's IntelliTrace ("Historical Debugger"). Up until the latest v6.0.6 of Isolator we did not support IntelliTrace, and that's why you're getting this error when it's enabled.

You can either disable IntelliTrace in Tools - Options - IntelliTrace, or install the latest version of Isolator from our Download page and use the Configuration tool to link Isolator with "Visual Studio 2010 Profilers" to have Isolator and IntelliTrace work together.

Hope that helps.
answered by igal (5.7k points)
0 votes
Thank you very, very much. My issue is now resolved. I had installed the latest version of Isolator, but I did not know about the Link-to-Profiler step. Your instructions were just what I needed. Thanks again.

- Dave
answered by daviddavidson3 (1.3k points)
...