Visual Studio 2017: A fatal error has occurred and debugging needs to be terminated

unit testingvisual-studio-2017

When executing unit tests in debugging mode, I get the following error message:

A fatal error has occurred and debugging needs to be terminated. For more 
details please see the Microsoft Help and Support web site. 
HRESULT=0x8000ffff. ErrorCode=0x0.

Best Answer

So my steps to fix the issue,

1- [Preventive action] Update the Visual studio 2017 , from the yellow flag notification or from

Tools >> Extensions & Updates >> Updates >> visual studio marketplace.

2- Search in your test solution for launchsettings.json file and remove it.

3- Clean the test solution .

4- Rebuild the project .

5- Make a cup of coffee ;).