Resharper Ultimate 2017.1.3 fails to execute .NET Core 2 xUnit tests in Visual Studio 2017.3


I created a xUnit test project targeting .NET Core 2.

I'm running:

  • Visual Studio 2017.3 (latest)
  • Resharper Ultimate 2017.1.3 (latest)
  • .NET Core 2 (latest)
  • Windows 10 Professional (latest)

Project dependencies:

NuGet:

  • Microsoft.NET.Test.Sdk (15.3.0)
  • Microsoft.TestPlatform.TestHost (15.3.0)
  • xunit (2.2.0)
  • xunit.runner.visualstudio (2.2.0)

SDK:

  • Microsoft.NETCore.App (2.0.0)

Test file: Class1.cs

using Xunit;

namespace Tests
{
    public class Class1
    {
        [Fact]
        public void Tests()
        {
            Assert.Equal(1, 1);
        }
    }
}

Test Explorer picks up the test and runs it successfully.


Resharper picks up the test, but fails to execute the test with "Inconclusive: Test not run"

Output > Resharper Tests:

[2017/08/15 4:56:24 PM] Exploration started for <Tests,.NETCoreApp,Version=v2.0>
[2017/08/15 4:56:24 PM] Exploration started for <Tests,.NETCoreApp,Version=v2.0> using <xUnit.net,XunitDotNetVsTestArtefactExplorer> on thread <1:>
[2017/08/15 4:56:24 PM] Exploration started for <Tests,.NETCoreApp,Version=v2.0> using <MSTest,MsTestDotNetVsTestArtefactExplorer> on thread <1:>
[2017/08/15 4:56:24 PM] Exploration skipped for <Tests,MSTest,.NETCoreApp,Version=v2.0>: project not supported by provider
[2017/08/15 4:56:24 PM] Exploration by <MSTest> completed for <Tests, .NETCoreApp,Version=v2.0>
[2017/08/15 4:56:24 PM] Exploration by <xUnit.net> failed for <Tests,.NETCoreApp,Version=v2.0> dotnet exited unexpectedly with the code (0) Output stream: Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170628-02 Copyright (c) Microsoft Corporation. All rights reserved. Error stream:

--- EXCEPTION #1/2 [ProcessExitedUnexpectedlyException]
Message = “
  dotnet exited unexpectedly with the code (0)
  Output stream: Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170628-02
  Copyright (c) Microsoft Corporation.  All rights reserved.
  Error stream:

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

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “
  Exploration by <xUnit.net> failed for <Tests,.NETCoreApp,Version=v2.0> dotnet exited unexpectedly with the code (0)
  Output stream: Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170628-02
  Copyright (c) Microsoft Corporation.  All rights reserved.
  Error stream:

ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.ReSharper.UnitTestFramework.Exploration.UnitTestArtefactExplorationRunner.<>c__DisplayClassd.<ExploreProject>b__8(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()


[2017/08/15 4:56:24 PM] Exploration by <xUnit.net> completed for <Tests, .NETCoreApp,Version=v2.0>
[2017/08/15 4:56:24 PM] Exploration completed for <Tests,.NETCoreApp,Version=v2.0>

I suspect the output from the latest Test Execution Command Line Tool changed.

Any suggestions?

31 comments
Comment actions Permalink

NOTE: My bad - upgrading to ReSharper 2017.3.3 fixed the issue (I was running 2017.3.1)

 

Hi, I have what looks like the same issue as Nick Josevi, even though RSRP-468169 is marked as fixed.

The behavior is that I only see a subset of my tests in ReSharper Unit Test Explorer, and running all tests does nothing.

The log contains:

--- EXCEPTION #2/2 [LoggerException]
Message = “Passed version string '2.1.101' doesn't look to be a valid .net core sdk version”

And eventually:

12:47:14.331 |W| UnitTestLaunch | System.NullReferenceException: Object reference not set to an instance of an object.
at JetBrains.ReSharper.UnitTestProvider.nUnit.v30.NUnitServiceProvider.GetRunStrategy(IUnitTestElement element)
at JetBrains.ReSharper.UnitTestProvider.nUnit.v30.Elements.NUnitElementBase.GetRunStrategy(IHostProvider hostProvider)
at JetBrains.ReSharper.UnitTestFramework.Launch.Stages.BuildStage.CollectProjectsToBuild()
at JetBrains.ReSharper.UnitTestFramework.Launch.Stages.BuildStage.Run(CancellationToken token)
at JetBrains.ReSharper.UnitTestFramework.Launch.UnitTestLaunch.RunStage(Object stageObject)

My project is using NET471, and I run ReSharper 2017.3.1 in Visual Studio 15.6.27428.2005

0

Please sign in to leave a comment.