Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio can't run a unit test (An exception occurred while invoking executor 'executor://nunit3testexecutor/')

Problem appeared from nothing, only changes I made in my code - installed RaSharper (but removing it and reinstalling Visual Studio was not helpful).

So I use NUnit 3 to run tests.

I have Visual Studio Test Adapter so I see my tests in Test Explorer.

I have Visual Studio 2013 Update 5.

The problem is then when I run any test I get the next message in output:

------ Run test started ------
NUnit Adapter 3.0.8.0 executing tests is started
Running selected tests in C:\Users\Denis\Documents\Visual Studio 2013\Projects\{Project_Name}\{Project_Name}\bin\Debug\{Project_Name}.exe
An exception occurred while invoking executor 'executor://nunit3testexecutor/': Failed to resolve assembly: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
========== Run test finished: 0 run (0:00:02.5951484) ==========

I tried to remove App.Config, I tried to reinstall visual studio, I tried to reinstall all NuGet packages. Still I can not run my tests.

Please help me.

In addition: I created a complitely new Project, installed NUnit 3.0.1 and NUnit 3.0 Test Adapter 3.0.8-ctp-8. My test was not run! I got the same error.

Update: My solution: I removed all .NET updates and reinstalled it. Also removed updates of Visual Studio that was installed on the day I encountered this error. It helped me. Still if someone has different solution or if someone know a reason of this error, you are welcome to share it.

like image 612
Denis Koreyba Avatar asked Mar 31 '26 14:03

Denis Koreyba


1 Answers

Clear your temp data (%temp%) and then run the test.

like image 123
Akash Vishwakarma Avatar answered Apr 02 '26 03:04

Akash Vishwakarma