Typemock not integrating with VS2017 and NUnit3

1k Views Asked by At

Trying to debug tests that use TypeMock and I get the following error:

TypeMock.TypeMockException: '
*** Typemock Isolator is currently disabled. Enable using the following:

 * Within Visual Studio: 
   - Use Typemock Smart Runner  
   - For other runners, Choose Typemock Menu and click "Integrate with Other Runners"

 * To run Typemock Isolator as part of an automated process you can:
    - run tests via TMockRunner.exe command line tool
    - use 'TypeMockStart' tasks for MSBuild or NAnt

For more information consult the documentation (see 'Running Unit Tests in an Automated Build')'

"Integrate with other Runners" is selected.

Versions:

  • Visual Studio: 15.9.4
  • TypeMock: 8.6.5.1
  • NUnit: 3.7.1

Installing the latest versions of TypeMock and NUnit does not fix the issue.

Edit: it works fine when I 'run' the tests. It only fails in 'debug'.

2

There are 2 best solutions below

0
David Poxon On BEST ANSWER

The solution to this problem (as provided by Typemock Support) was as follows.

Create a file named knownRunners.dat in C:\Program Files (x86)\Typemock\Isolator\8.6 (Typemock remarked that this might not be the location of my Typemock 8.6 installation - so it would be best to confirm.) The contents of the file should be:

testhost.x86.exe
testhost.exe

After doing this I restarted Visual Studio, and I could debug tests without any issues.

EDIT (2021-03-08)

In at least Typemock 8.2.3 this issue became intermittent. Updating the contents of knownRunners.dat to the following should resolve any issues:

testhost.net48.x86.exe

I found version 8.9.3.1 to work without any issues.

6
CoralTypemock On

My name is Coral, and I work for Typemock.

I noticed by chance your post here and I'd like to help you :)

Do you mind answering the following questions, please:

• What runner are you using to run your tests? • Do you use other tools as well (e.g dotCover, Coverage)?

Additionally, I'd appreciate it if you could run following task for me:

Go to Typemock->Options->Mocking Integration and check that "Enable Mocking integration" and "Enable Auto Linking(with other Coverage Tools)" boxes are checked too. Then, Open Developer Command Prompt for VS2017 as an admin - Run the command: devenv /Setup - Wait until it finishes - Open your solution

Try to debug your tests now and please let me know if this solves the issue.

It would be helpful if you could send us the logs directly to the following e-mail address: [email protected]

You can retrieve the logs via (Typemock->Options->Logs-> Mocking ( check SmartRunner as well if you are running via SmartRunner)

I hope this helps. In the future, feel free to open a ticket at Typemock support: https://typemock.freshdesk.com/support/tickets/new