ReSharper says project.json does not exist when starting NUnit tests in new VS csproj structure

Hi, couple of guys in our company (just couple) has problem, that ReSharper do not start NUnit test

We have

  latest VS 15.6.4

  latest R# 2017.3.5

  target FW net471

  new csproj structure

Why ReSharper wants project.json? We have never used it.

This is ReSharper log

Output stream:
Error stream: dotnet-test Error: 0 : System.InvalidOperationException: D:\0Work\Skymamba_3\Packages\Test\project.json does not exist.
at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)
11:25:53.693 |W| Unit Testing | Exploration by <NUnit 3x> failed for <Test.Skymamba,.NETFramework,Version=v4.7.1> dotnet exited unexpectedly with the code (-1) Output stream: Error stream: dotnet-test Error: 0 : System.InvalidOperationException: D:\0Work\Skymamba_3\Packages\Test\project.json does not exist. at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath) at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)

--- EXCEPTION #1/2 [ProcessExitedUnexpectedlyException]
Message = “
dotnet exited unexpectedly with the code (-1)
Output stream:
Error stream: dotnet-test Error: 0 : System.InvalidOperationException: D:\0Work\Skymamba_3\Packages\Test\project.json does not exist.
at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)

ExceptionPath = Root.InnerException
ClassName = JetBrains.ReSharper.UnitTestFramework.DotNetCore.Exceptions.ProcessExitedUnexpectedlyException
HResult = COR_E_EXCEPTION=80131500

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “
Exploration by <NUnit 3x> failed for <Test.Skymamba,.NETFramework,Version=v4.7.1> dotnet exited unexpectedly with the code (-1)
Output stream:
Error stream: dotnet-test Error: 0 : System.InvalidOperationException: D:\0Work\Skymamba_3\Packages\Test\project.json does not exist.
at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)

8 comments

There is not any file with this name :(, maybe somewhere in some shared folder?

0

I have enabled logs with Trace and there is a lot of errors (dont not sure if connected)

10:24:58.057 |T| UnitTestResultManager | Marking Test.Infrastructure.HttpHandlerTest.HttpHandlerHandlesStaticFiles as FINISHED. Current status: Inconclusive | Pending taskResult: Inconclusive Stacktrace: at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at JetBrains.ReSharper.UnitTestFramework.UnitTestResultManager.<>c__DisplayClass2e.<TestFinishing>b__2d(PersistentSessionUnitTestElementKey key, UnitTestResult result)
at JetBrains.ReSharper.UnitTestFramework.UnitTestResultManager.ExecuteWithResult(IUnitTestElement element, IUnitTestSession session, Action`2 action)
at JetBrains.ReSharper.UnitTestFramework.UnitTestResultManager.TestFinishing(IUnitTestElement element, IUnitTestSession session, String message, TaskResult taskResult)
at JetBrains.ReSharper.UnitTestFramework.Launch.UnitTestLaunch.FinishLaunchStage.MarkAsSkippedIfNotCompleted(KeyValuePair`2 pair, Boolean isRunCompleted, Boolean isRunAborted, Boolean isRunCancelled, ISet`1 invalidDynamicElements)
at JetBrains.ReSharper.UnitTestFramework.Launch.UnitTestLaunch.FinishLaunchStage.Run(CancellationToken token)
at JetBrains.ReSharper.UnitTestFramework.Launch.UnitTestLaunch.<Run>b__4(Task t)
at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

0

Thanks for the reply. Please send me R# log file in "Verbose" mode (devenv /ReSharper.LogFile C:\log\resharper_log.txt /ReSharper.LogLevel Verbose) then reproduce the issue and share it here. Also, it will be great if you share the output of "dotnet --version" command.

0

There is link to log

http://www.uschovna.cz/zasilka/XL276S2AXNY7TS9J-NFX/ 

 

dotnet --version
1.0.0-preview2-003131

 

0

"1.0.0-preview2-003131" means that .NET Core SDK 1.0 preview2 is used. But this dotnet version uses project.json instead of new csproj format https://blogs.msdn.microsoft.com/dotnet/2016/06/27/announcing-net-core-1-0/. 

Right now, the latest dotnet version is 2.1.103.

1

Awesome, this fixed problem, thx very much

0

Great! You are always welcome!

 

0

Please sign in to leave a comment.