Unable to run one of my test project after upgrade to NUnit >= 3

Answered

I am getting this error:

2016.09.06 12:39:09.971 ERROR System.InvalidCastException: Unable to cast object of type 'JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestTask' to type 'JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestFixtureTask'.
at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTaskRunner.PrepareFixturesAndTests(TaskExecutionNode assemblyNode, String assemblyLocation)
at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTaskRunner.PrepareFixturesAndTests(TaskExecutionNode assemblyNode, String assemblyLocation)
at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTaskRunner.PrepareFixturesAndTests(TaskExecutionNode assemblyNode, String assemblyLocation)
at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTaskRunner.PrepareFixturesAndTests(TaskExecutionNode assemblyNode, String assemblyLocation)
at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTaskRunner.ExecuteRecursive(TaskExecutionNode node)
at JetBrains.ReSharper.TaskRunnerFramework.StartupTaskRunnerHost.Execute(TaskExecutionNode node)
at JetBrains.ReSharper.TaskRunnerFramework.StartupTaskRunnerHost.ExecuteNodes(IEnumerable`1 nodes)
at JetBrains.ReSharper.TaskRunnerFramework.TasksPacketHandler.ThreadProc(TaskRunnerProxy proxy, IEnumerable`1 packets, AssemblyLoader loader)

Another coworker can run the test but he is using R# 10 and I am using R# 2016.2

6 comments
Comment actions Permalink

Please try unticking "ReSharper | Options | Tools | Unit Testing | NUnit | Enable NUnit 2.x support" checkbox

Thanks!  

1
Comment actions Permalink

I'm having the same problem with 1 test project, even after the workaround.

JetBrains ReSharper Ultimate 2016.2.2  Build 106.0.20160913.91321

Is there something else that I can do?

 

1
Comment actions Permalink

I am also having the same problem as @Costin mentioned. Please provide a resolution to this.

0
Comment actions Permalink

Hello 

Are you able to reproduce the same exception in a demo project?

Thanks! 

0
Comment actions Permalink

No it happens only for one of the project in my solution.

0

Please sign in to leave a comment.