Search code examples
visual-studio-2017nunit-3.0typemocktypemock-isolator

Typemock not integrating with VS2017 and NUnit3


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'.


Solution

  • 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.