nunit3-vs-adapter: Fatal error debugging tests via Test-Explorer
Thanks for your work getting nunit3-vs-adapter running with .net core. Running tests via dotnet test or Test-Explorer in VS seems to work fine.
When i try to debug a test via Test-Explorer a Message-Box with following Message appears:
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

I’m using VS 2017 V15.1 (26403.79) and referencing following packages:
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="Moq" Version="4.7.9" />
<PackageReference Include="NUnit" Version="3.6.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 8
- Comments: 29 (10 by maintainers)
I had exactly the same problem. But after clean and rebuild the solution, the problem was solved.
VS 2017 Pro. Version: 15.8.4 Still reproducing. Using NUnit 3.10.1. Used solution from here
@aleha84 Thank you!
My issues was my test projects had a launchsettings!
This is because before the fixes in 2.2 we were told for our tests, we need to target the
.WebSDK. So as I converted everything over back to the normal SDK those files remained.Removing the IIS Express profile from the launchsettings.json fixed this issue for me.
I apologize if someone already mentioned this, but I encountered this error while trying to debug some Azure functions. You can run into this error if you specify a .NET framework version but have the function API specified to V2.
<PropertyGroup> <TargetFramework>net461</TargetFramework> <AzureFunctionsVersion>v2</AzureFunctionsVersion> <== This will cause it to throw the error. Fix is to just change it to V1 </PropertyGroup>I had the same problem with xUnit and solved this problem changing project type from Library to Console Application:
My final csproj: https://gist.github.com/ircnelson/9cbddb681d520d7f581dbfc99709a9e1
I had the same problem. Here is my project file:
It kept producing the same error message as above as many times as I ran it. Then I read some of the posts here that said “overnight it stopped happening”. I decided to close Visual Studio 2017 and reopen it and then it started working. So, it looks like this probably isn’t a problem with the test adapter, but a caching issue of some sort in Visual Studio.
Following @Gerfaut 's recipe (Thanks, that was to the point!!!) , and updating to NUnit 3.7.1, and adapter 3.8.0-alpha1 I can confirm it still fails.
I am pretty sure this is VS, so I’ll contact them about it. It might be related to the adapter, that we’re not acting the way we should (but don’t know yet - A little bit of Kafka here), so I’ll keep it open.
PS: Thanks also to @giggio , @ircnelson , @MikeBeaton , @NightOwl888 and @bunnu for the feedback, it really helps when more can confirm and elaborate on the issues!
I can confirm that changing from Library to Console App solves the problem.
@NightOwl888 thanks for the update. It is definately looking like a Visual Studio issue, but I am going to leave this issue open for a bit so others can find it easily.
Hi @rprouse,
I have the exact same behavior than @bunnu, my previous try is now working… but I succeed to recreate the problem. Here are the step to do it:
dotnet new slnMy AV is BitDefender Endpoint Security Tools but I don’t think there is a issue with this 😃
Does it help a bit ? Do you need the full project (which should work then) ?
Thanks!