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'.
The solution to this problem (as provided by Typemock Support) was as follows.
Create a file named
knownRunners.datinC:\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: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.datto the following should resolve any issues:I found version 8.9.3.1 to work without any issues.