2
votes

I am not able to run tests in ReSharper 2018.2.3 after update ReScharper it self and Visual Studio till 15.8.6. Reinstall does not help.

ERROR JetBrains.ReSharper.UnitTestRunner.nUnit.CodeDom.CompileException: NUnit runner compilation failed

(126:90) ) expected

(126:96) ; expected

(126:96) Invalid expression term ')'

(126:97) ; expected

(126:97) Invalid expression term ')'

(126:98) ; expected

Server stack trace:

at JetBrains.ReSharper.UnitTestRunner.nUnit.CodeDom.RunnerTypeCompiler.AssertCompilationResultsHaveNoErrors(CompilerResults compilerResults)

at JetBrains.ReSharper.UnitTestRunner.nUnit.CodeDom.RunnerTypeCompiler.CompileIntoAssembly(String outputPath, Assembly resourceAssembly, String[] resourcesToCompile, String[] assembliesToReference)

at JetBrains.ReSharper.UnitTestRunner.nUnit30.DelegatingTestRunner.GetRunner(String nUnitInstallDir, TaskExecutorConfiguration configuration, SimpleLogger logger)

at JetBrains.ReSharper.UnitTestRunner.nUnit30.DelegatingTestRunner.RunTests(IRemoteTaskServer server, List1 assemblies, Dictionary2 tests, Dictionary2 fixtures, List1 explicitly, Boolean useAddins, String nUnitInstallDir, TaskExecutorConfiguration configuration, SimpleLogger logger)

at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

at JetBrains.ReSharper.UnitTestRunner.nUnit.INUnitRunner.RunTests(IRemoteTaskServer server, List1 assemblies, Dictionary2 tests, Dictionary2 fixtures, List1 explicitly, Boolean useAddins, String nUnitInstallDir, TaskExecutorConfiguration configuration, SimpleLogger logger)

at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTaskRunner.Run(String nUnitInstallDir, String assmbl, Boolean useAddins)

at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTaskRunner.RunTestsInAssemblies(List`1 assemblies, NUnitTestAssemblySetTask assemblySetTask, Boolean useAddins, NUnitVersion nUnitVersion)

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)

2
Do you have the checkbox "Use specified custom NUnit" ticked under "Options | Tools | Unit Testing | NUnit"?Alexander Kurakin
Thanks for the idea. The checkbox was checked and I had a message "NUnit versiom 3.9.0.0 is detected". I unchecked this checkbox, and it helped me.Vadzim Bichan

2 Answers

3
votes

There is the same issue on JetBrains public bug tracker. As a workaround, for now, untick the checkbox "Use specified custom NUnit" ticked under "ReSharper | Options | Tools | Unit Testing | NUnit".

0
votes

Try to update or reinstall related with NUnit packages

Update-Package <package_name>
Update-Package <package_name> –reinstall