dotCover fails to perform coverage of unit tests with one of the following error messages:
- Coverage session finished with errors: Can't set event mask (COM error 0x80131377).
- Coverage session finished with errors: Can't profile the application because the host protection is applied. Probably it relates with Microsoft SQL…
- As MS SQL prohibits access to its process, dotCover is unable to instrument it.
You should exclude sqlsrvr.exe from coverage using process filters. Currently, this is possible only for the console runner. To exclude sqlsrvr.exe, run coverage with the additional /ProcessFilters=sqlsrvr.exe argument.